openai/codex · error · BuildCustomCaTransportError
Failed to build HTTP client while using CA bundle from
Error message
Failed to build HTTP client while using CA bundle from {} ({}): {source} What it means
The custom CA bundle was read and parsed, but reqwest rejected the final client configuration built around it. This BuildClientWithCustomCa variant fires at the last construction step, meaning the certificate material itself was fine while some other TLS/client setting (protocol support, feature flags, builder options) failed; the underlying reqwest::Error is chained as the source.
Solutions
- Inspect the chained reqwest::Error source to identify which client-builder setting failed
- Check that the reqwest/rustls feature set in use supports the required TLS configuration
- Verify TLS backend prerequisites on the platform (e.g. root store availability, protocol versions)
- Retry after correcting configuration; if unresolved, unset the CA env vars and rely on system roots
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at codex-rs/http-client/src/custom_ca.rs:116 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of openai/codex@339751715c (2026-08-25).
Data as JSON: /api/errors/3a13a69ef26c893d.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/http-client/src/custom_ca.rs:116
detail: String,
},
/// One parsed certificate block could not be registered with the reqwest client builder.
#[error(
"Failed to parse certificate #{certificate_index} from {} selected by {}: {source}. {hint}",
path.display(),
source_env,
hint = CA_CERT_HINT
)]
RegisterCertificate {
source_env: &'static str,
path: PathBuf,
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}",View on GitHub (pinned to 339751715c)