{"record":{"id":"88c1ddc228c935c7","repo":"tinyhumansai/openhuman","slug":"brave-request-failed-e","errorCode":null,"errorMessage":"Brave request failed: {e}","messagePattern":"Brave request failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/search/tools/brave.rs","lineNumber":84,"sourceCode":"        path = %path,\n        timeout_secs = cfg.timeout_secs,\n        key_present = true,\n        param_count = query.len(),\n        \"[brave] GET request\"\n    );\n    let client = http_client(cfg.timeout_secs)?;\n    let started = std::time::Instant::now();\n    let resp = client\n        .get(&url)\n        .header(\"X-Subscription-Token\", key)\n        .header(\"Accept\", \"application/json\")\n        .header(\"Accept-Encoding\", \"gzip\")\n        .query(query)\n        .send()\n        .await\n        .map_err(|e| {\n            tracing::warn!(path = %path, \"[brave] request send failed: {e}\");\n            anyhow::anyhow!(\"Brave request failed: {e}\")\n        })?;\n    let status = resp.status();\n    let elapsed_ms = started.elapsed().as_millis();\n    let body = resp.text().await.unwrap_or_default();\n    if !status.is_success() {\n        let detail = crate::openhuman::util::utf8_safe_prefix_at_byte_boundary(&body, 500);\n        tracing::warn!(\n            path = %path,\n            status = %status,\n            elapsed_ms = elapsed_ms as u64,\n            \"[brave] non-2xx response: {detail}\"\n        );\n        anyhow::bail!(\"Brave returned {status}: {detail}\");\n    }\n    tracing::debug!(\n        path = %path,\n        status = %status,\n        elapsed_ms = elapsed_ms as u64,","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/search/tools/brave.rs#L66-L102","documentation":"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.","triggerScenarios":"Thrown at src/openhuman/search/tools/brave.rs:84 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}