{"record":{"id":"05f7530f712cb799","repo":"openai/codex","slug":"failed-to-build-http-client-while-using-system-roo","errorCode":null,"errorMessage":"Failed to build HTTP client while using system root certificates: {0}","messagePattern":"Failed to build HTTP client while using system root certificates: (.+?)","errorType":"exception","errorClass":"BuildCustomCaTransportError","httpStatus":null,"severity":"error","filePath":"codex-rs/http-client/src/custom_ca.rs","lineNumber":129,"sourceCode":"        certificate_index: usize,\n        source: reqwest::Error,\n    },\n\n    /// Reqwest rejected the final client configuration after a custom CA bundle was loaded.\n    #[error(\n        \"Failed to build HTTP client while using CA bundle from {} ({}): {source}\",\n        source_env,\n        path.display()\n    )]\n    BuildClientWithCustomCa {\n        source_env: &'static str,\n        path: PathBuf,\n        #[source]\n        source: reqwest::Error,\n    },\n\n    /// Reqwest rejected the final client configuration while using only system roots.\n    #[error(\"Failed to build HTTP client while using system root certificates: {0}\")]\n    BuildClientWithSystemRoots(#[source] reqwest::Error),\n\n    /// One parsed certificate block could not be registered with the websocket TLS root store.\n    #[error(\n        \"Failed to register certificate #{certificate_index} from {} selected by {} in rustls root store: {source}. {hint}\",\n        path.display(),\n        source_env,\n        hint = CA_CERT_HINT\n    )]\n    RegisterRustlsCertificate {\n        source_env: &'static str,\n        path: PathBuf,\n        certificate_index: usize,\n        source: rustls::Error,\n    },\n}\n\nimpl From<BuildCustomCaTransportError> for io::Error {","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/http-client/src/custom_ca.rs#L111-L147","documentation":"Reqwest rejected the final client configuration when building the HTTP client with only the system root certificate store (no custom CA bundle in play). This BuildClientWithSystemRoots variant wraps the reqwest::Error directly and indicates a failure in TLS backend initialization or client builder settings on this machine, independent of any user-supplied certificates.","triggerScenarios":"Thrown at codex-rs/http-client/src/custom_ca.rs:129 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped reqwest::Error to identify the failing builder or TLS-backend step","Ensure system CA roots are installed (e.g. ca-certificates package on Linux)","Check that TLS features required by the build (rustls/native-tls) are enabled and compatible","Retry after fixing environment or rebuilding with the correct TLS feature flags"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}