{"record":{"id":"0e9578d37cf9bc74","repo":"tinyhumansai/openhuman","slug":"failed-to-build-integration-http-client","errorCode":null,"errorMessage":"failed to build integration HTTP client","messagePattern":"failed to build integration HTTP client","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/integrations/client.rs","lineNumber":344,"sourceCode":"        // to fix up the input so the regression is observable in logs.\n        let backend_url = sanitize_backend_url(&backend_url);\n\n        // Platform-appropriate TLS backend — see [`crate::openhuman::util::tls`].\n        // Windows uses schannel (native-tls) to honor the OS cert store;\n        // macOS / Linux keep rustls which avoids the OpenSSL runtime dep and\n        // has historically been more reliable on staging TLS handshakes.\n        //\n        // `/agent-integrations/*` is backend traffic like any other, so it\n        // carries the same product identity as `BackendOAuthClient`. The SDK\n        // merges its own default headers into every request, so `http_client`\n        // needs nothing beyond `with_default_headers` below.\n        let product_headers = crate::api::product::product_identity_headers();\n        let http_client = crate::openhuman::util::tls::tls_client_builder()\n            .http1_only()\n            .timeout(Duration::from_secs(60))\n            .connect_timeout(Duration::from_secs(15))\n            .build()\n            .expect(\"failed to build integration HTTP client\");\n        let sdk = TinyHumansClient::new(&backend_url)\n            .with_token(Some(auth_token.clone()))\n            .with_http_client(http_client.clone())\n            .with_default_headers(product_headers);\n        // `download_client` deliberately does NOT carry the product identity.\n        // 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.","sourceCodeStart":326,"sourceCodeEnd":362,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/integrations/client.rs#L326-L362","documentation":"Panic payload on the reqwest client build for IntegrationClient (/agent-integrations/* traffic): after sanitizing the backend URL and selecting the platform TLS backend (schannel on Windows, rustls elsewhere) plus product-identity headers, builder.build() failed. Client construction is deterministic from config, so failure means malformed proxy/TLS configuration; the expect aborts client creation.","triggerScenarios":"Thrown at src/openhuman/integrations/client.rs:344 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect proxy and TLS settings in the effective config for malformed values","Verify the schannel/rustls feature set matches the platform build","Replace the expect with error propagation so integrations degrade gracefully when the client cannot build"],"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-14T00:17:10.932Z"}