openai/codex · error · BuildCustomCaTransportError
Failed to build HTTP client while using system root…
Error message
Failed to build HTTP client while using system root certificates: {0} What it means
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.
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
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at codex-rs/http-client/src/custom_ca.rs:129 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- SSL/TLS and certificate errors — how TLS handshakes and certificate validation fail.
AI-assisted analysis of openai/codex@339751715c (2026-08-25).
Data as JSON: /api/errors/05f7530f712cb799.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/http-client/src/custom_ca.rs:129
certificate_index: usize,
source: reqwest::Error,
},
/// Reqwest rejected the final client configuration after a custom CA bundle was loaded.
#[error(
"Failed to build HTTP client while using CA bundle from {} ({}): {source}",
source_env,
path.display()
)]
BuildClientWithCustomCa {
source_env: &'static str,
path: PathBuf,
#[source]
source: reqwest::Error,
},
/// Reqwest rejected the final client configuration while using only system roots.
#[error("Failed to build HTTP client while using system root certificates: {0}")]
BuildClientWithSystemRoots(#[source] reqwest::Error),
/// One parsed certificate block could not be registered with the websocket TLS root store.
#[error(
"Failed to register certificate #{certificate_index} from {} selected by {} in rustls root store: {source}. {hint}",
path.display(),
source_env,
hint = CA_CERT_HINT
)]
RegisterRustlsCertificate {
source_env: &'static str,
path: PathBuf,
certificate_index: usize,
source: rustls::Error,
},
}
impl From<BuildCustomCaTransportError> for io::Error {View on GitHub (pinned to 339751715c)