tinyhumansai/openhuman · error

Brave returned {status}: {detail}

Error message

Brave returned {status}: {detail}

What it means

brave_get got a non-success HTTP status from the Brave API; the body prefix (bounded to 500 chars, UTF-8-safe) is embedded as {detail}. Rate limits, quota exhaustion and an invalid API key all surface here with different statuses.

Source

Thrown at src/openhuman/search/tools/brave.rs:97

        .query(query)
        .send()
        .await
        .map_err(|e| {
            tracing::warn!(path = %path, "[brave] request send failed: {e}");
            anyhow::anyhow!("Brave request failed: {e}")
        })?;
    let status = resp.status();
    let elapsed_ms = started.elapsed().as_millis();
    let body = resp.text().await.unwrap_or_default();
    if !status.is_success() {
        let detail = crate::openhuman::util::utf8_safe_prefix_at_byte_boundary(&body, 500);
        tracing::warn!(
            path = %path,
            status = %status,
            elapsed_ms = elapsed_ms as u64,
            "[brave] non-2xx response: {detail}"
        );
        anyhow::bail!("Brave returned {status}: {detail}");
    }
    tracing::debug!(
        path = %path,
        status = %status,
        elapsed_ms = elapsed_ms as u64,
        body_bytes = body.len(),
        "[brave] response ok"
    );
    serde_json::from_str::<Value>(&body).map_err(|e| {
        tracing::warn!(path = %path, "[brave] JSON parse failed: {e}");
        anyhow::anyhow!("Brave returned malformed JSON: {e}")
    })
}

fn extract_query(args: &Value) -> anyhow::Result<String> {
    let q = args
        .get("query")
        .and_then(|v| v.as_str())

View on GitHub (pinned to 7491200858)

Solutions

  1. Retry after the rate-limit window if the status is 429
  2. Check the Brave API key under Connections > Search engine for 401/403
  3. Read {detail} for Brave's own reason
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at src/openhuman/search/tools/brave.rs:97 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/68c5f44033d2dd94. Report an issue: GitHub.