{"record":{"id":"f58ef442147124c2","repo":"tinyhumansai/openhuman","slug":"failed-to-build-integration-download-http-client","errorCode":null,"errorMessage":"failed to build integration download HTTP client","messagePattern":"failed to build integration download HTTP client","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/integrations/client.rs","lineNumber":368,"sourceCode":"        // Its one caller (`get_bytes`) fetches\n        // `/agent-integrations/file-storage/files/{id}/download`, which answers\n        // a 302 to a presigned S3 URL. reqwest follows redirects by default and\n        // strips only *sensitive* headers (Authorization, Cookie, …) when the\n        // host changes — a custom header like `x-sdk-name` survives the hop, so\n        // tagging this transport would disclose the product identity to the\n        // storage provider. Attaching it per-request would not help: redirected\n        // requests carry the original request headers too.\n        //\n        // The lost attribution is deliberate and cheap: the header cannot be\n        // scoped to the first hop without hand-rolling redirect following, and\n        // any session that downloads a file has already made SDK-path calls that\n        // are tagged.\n        let download_client = crate::openhuman::util::tls::tls_client_builder()\n            .http1_only()\n            .timeout(Duration::from_secs(15 * 60))\n            .connect_timeout(Duration::from_secs(15))\n            .build()\n            .expect(\"failed to build integration download HTTP client\");\n\n        Self {\n            backend_url,\n            auth_token,\n            budget_config,\n            sdk,\n            download_client,\n            pricing: tokio::sync::OnceCell::new(),\n        }\n    }\n\n    async fn ensure_budget_available(&self, path: &str) -> anyhow::Result<()> {\n        if !managed_budget_applies_to_path(path) {\n            return Ok(());\n        }\n        if let Some(config) = &self.budget_config {\n            if crate::openhuman::hosted::team::managed_tool_budget_exhausted(config).await {\n                anyhow::bail!(","sourceCodeStart":350,"sourceCodeEnd":386,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/integrations/client.rs#L350-L386","documentation":"Panic payload on the separate download client used by IntegrationClient::get_bytes: this deliberately untagged client (no x-sdk-name header, since it follows a 302 to presigned S3) still must construct, and builder.build() failed — again a configuration-level failure (proxy/TLS) rather than a per-request one. Aborts the client constructor.","triggerScenarios":"Thrown at src/openhuman/integrations/client.rs:368 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Validate proxy URL configuration shared with the main integration client","Check TLS backend availability for the platform","Propagate the build error instead of expecting, so file downloads can fail per-call rather than kill the client"],"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"}