{"record":{"id":"dc7e3f1e8ed6299b","repo":"tinyhumansai/openhuman","slug":"failed-to-build-seltz-http-client","errorCode":null,"errorMessage":"failed to build Seltz HTTP client","messagePattern":"failed to build Seltz HTTP client","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/search/tools/seltz.rs","lineNumber":73,"sourceCode":"    timeout_secs: u64,\n    http_client: reqwest::Client,\n}\n\nimpl SeltzSearchTool {\n    pub fn new(\n        api_key: Option<String>,\n        api_url: Option<String>,\n        max_results: usize,\n        timeout_secs: u64,\n    ) -> Self {\n        let timeout = timeout_secs.max(1);\n        // Platform-appropriate TLS backend — see [`crate::openhuman::util::tls`].\n        let http_client = crate::openhuman::util::tls::tls_client_builder()\n            .http1_only()\n            .timeout(Duration::from_secs(timeout))\n            .connect_timeout(Duration::from_secs(10))\n            .build()\n            .expect(\"failed to build Seltz HTTP client\");\n\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,\n            http_client,\n        }\n    }\n\n    fn render_results_plain(&self, docs: &[SeltzDocument], query: &str) -> String {\n        if docs.is_empty() {\n            return format!(\"No results found for: {}\", query);\n        }\n\n        let mut lines = vec![format!(\"Search results for: {} (via Seltz)\", query)];\n\n        for (i, doc) in docs.iter().take(self.max_results).enumerate() {","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/search/tools/seltz.rs#L55-L91","documentation":"Panic payload on the Seltz search tool's client build in new(): the platform tls_client_builder() with http1_only and computed timeouts (max(1) seconds) failed at build(). Since every input is a constant or sanitized config value, this is a TLS/proxy environment failure raised at tool construction time.","triggerScenarios":"Thrown at src/openhuman/search/tools/seltz.rs:73 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the TLS backend and proxy settings of the host environment","Propagate a Result from new() so the tool registers as unavailable instead of panicking","Log the underlying reqwest error before the panic for diagnosis"],"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"}