tinyhumansai/openhuman · error
Brave request failed: {e}
Error message
Brave request failed: {e} What it means
The HTTPS request to the Brave Search API (`api.search.brave.com`) failed at the transport layer inside `brave_get`. This fires on network-level problems: DNS resolution failure, connection refused/reset, TLS handshake failure, or the configured timeout elapsing before the response arrives. A non-2xx HTTP status is NOT this error — that is handled separately with a status-coded message.
Source
Thrown at src/openhuman/search/tools/brave.rs:84
path = %path,
timeout_secs = cfg.timeout_secs,
key_present = true,
param_count = query.len(),
"[brave] GET request"
);
let client = http_client(cfg.timeout_secs)?;
let started = std::time::Instant::now();
let resp = client
.get(&url)
.header("X-Subscription-Token", key)
.header("Accept", "application/json")
.header("Accept-Encoding", "gzip")
.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,View on GitHub (pinned to 7491200858)
Solutions
- Check connectivity: `curl -I https://api.search.brave.com/res/v1/web/search`
- If behind a proxy, configure it in the core's proxy settings so the reqwest client honours it
- For timeout-caused failures, raise `search.brave.timeout_secs` in config.toml
- Transient network blips often clear on retry — the request is idempotent
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at src/openhuman/search/tools/brave.rs:84 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/88c1ddc228c935c7.
Report an issue: GitHub.