{"record":{"id":"bc5f128c41a482cf","repo":"tinyhumansai/openhuman","slug":"failed-to-build-exa-http-client-e","errorCode":null,"errorMessage":"failed to build Exa HTTP client: {e}","messagePattern":"failed to build Exa HTTP client: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/search/tools/exa.rs","lineNumber":144,"sourceCode":"        timeout_secs: u64,\n    ) -> Self {\n        Self {\n            api_key,\n            api_url: api_url.unwrap_or_else(|| DEFAULT_API_URL.to_string()),\n            max_results: max_results.clamp(1, 20),\n            timeout_secs: timeout_secs.max(1),\n        }\n    }\n\n    /// Build the HTTP client at call time, like `brave.rs::http_client`, so a\n    /// TLS-backend failure surfaces as a tool error instead of aborting the\n    /// process while a session is being constructed.\n    fn http_client(&self) -> anyhow::Result<reqwest::Client> {\n        crate::openhuman::util::tls::tls_client_builder()\n            .timeout(Duration::from_secs(self.timeout_secs))\n            .connect_timeout(Duration::from_secs(10))\n            .build()\n            .map_err(|e| anyhow::anyhow!(\"failed to build Exa HTTP client: {e}\"))\n    }\n\n    /// Destination host for the egress descriptor, e.g. `api.exa.ai`.\n    fn egress_host(&self) -> String {\n        reqwest::Url::parse(&self.api_url)\n            .ok()\n            .and_then(|u| u.host_str().map(str::to_string))\n            .unwrap_or_else(|| \"api.exa.ai\".to_string())\n    }\n\n    /// Egress descriptor for a call to Exa. The query (or the requested URLs)\n    /// is user content leaving the device, so it carries `Prompt` on top of the\n    /// destination `Url` that `network_fetch` supplies.\n    fn egress_descriptor(&self) -> crate::openhuman::security::egress::EgressDescriptor {\n        crate::openhuman::security::egress::EgressDescriptor::network_fetch(self.egress_host())\n            .with_data_kind(crate::openhuman::security::egress::DataKind::Prompt)\n    }\n","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/search/tools/exa.rs#L126-L162","documentation":"Returned by ExaClient::http_client() when reqwest's TLS-backed client builder fails (e.g. native TLS backend unavailable or misconfigured). The client is built lazily at call time — deliberately mirroring brave.rs — so that a process-wide TLS construction failure surfaces as a normal tool error on the search call instead of aborting process or session construction. The faulty input is the environment's TLS configuration, not the search arguments.","triggerScenarios":"Thrown at src/openhuman/search/tools/exa.rs:144 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the platform TLS backend (rustls vs native-tls) and ensure required root certificates are present.","Verify no proxy or security software corrupts certificate loading; inspect OPENHUMAN TLS/env settings.","Fix util::tls::tls_client_builder configuration and retry the search call."],"exampleFix":null,"handlingStrategy":"try-catch","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-14T05:17:10.506Z"}