{"record":{"id":"b15a412f58b34306","repo":"tinyhumansai/openhuman","slug":"failed-to-build-http-client-e","errorCode":null,"errorMessage":"failed to build HTTP client: {e}","messagePattern":"failed to build HTTP client: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/api/rest.rs","lineNumber":288,"sourceCode":"        }\n    }\n    // Which product this core is embedded in. Set at the transport level rather\n    // than only on the SDK because `raw_client()` hands this same client to\n    // callers that bypass the SDK entirely (multipart STT upload), and that\n    // traffic needs attributing too.\n    let (name, value) = crate::api::product::product_identity_header();\n    default_headers.insert(name, value);\n\n    // Platform-appropriate TLS backend: Windows → schannel (honors the OS\n    // cert store, required for corporate TLS-inspection proxies); macOS /\n    // Linux → rustls. See [`crate::openhuman::util::tls::tls_client_builder`].\n    crate::openhuman::util::tls::tls_client_builder()\n        .default_headers(default_headers)\n        .http1_only()\n        .timeout(Duration::from_secs(120))\n        .connect_timeout(Duration::from_secs(15))\n        .build()\n        .map_err(|e| anyhow::anyhow!(\"failed to build HTTP client: {e}\"))\n}\n\n/// Normalize the backend envelope while preserving OpenHuman's historical\n/// response shape. In particular, `/auth/me` returns `{success,user}` rather\n/// than `{success,data}`; SDK transport must not expose that envelope detail to\n/// existing callers.\nfn parse_api_response_value(value: Value) -> Result<Value> {\n    let Some(object) = value.as_object() else {\n        return Ok(value);\n    };\n    if let Some(user) = object.get(\"user\").filter(|user| !user.is_null()) {\n        return Ok(user.clone());\n    }\n    let Some(success) = object.get(\"success\").and_then(Value::as_bool) else {\n        return Ok(value);\n    };\n    if !success {\n        let message = object","sourceCodeStart":270,"sourceCodeEnd":306,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/api/rest.rs#L270-L306","documentation":"Construction of the shared backend reqwest client failed at the TLS/transport layer (client builder rejected its configuration, e.g. incompatible TLS options or environment); since every backend call needs this client, BackendOAuthClient creation aborts.","triggerScenarios":"Thrown at src/api/rest.rs:288 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped source error for the rejected builder option","Check proxy/TLS environment variables for malformed values","Fix platform TLS prerequisites and retry client creation"],"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-23T08:17:48.524Z"}