{"record":{"id":"35214d1ce2f9d0ff","repo":"openai/codex","slug":"failed-to-construct-http-request-for-signing-0","errorCode":null,"errorMessage":"failed to construct HTTP request for signing: {0}","messagePattern":"failed to construct HTTP request for signing: (.+?)","errorType":"exception","errorClass":"AwsAuthError","httpStatus":null,"severity":"error","filePath":"codex-rs/aws-auth/src/lib.rs","lineNumber":59,"sourceCode":"\n/// Errors returned by credential loading or SigV4 signing.\n#[derive(Debug, Error)]\npub enum AwsAuthError {\n    #[error(\"AWS service name must not be empty\")]\n    EmptyService,\n    #[error(\"AWS profile must be configured\")]\n    MissingProfile,\n    #[error(\"AWS SDK config did not resolve a credentials provider\")]\n    MissingCredentialsProvider,\n    #[error(\"AWS SDK config did not resolve a region\")]\n    MissingRegion,\n    #[error(\"failed to load AWS profiles: {0}\")]\n    ProfileLoad(#[from] aws_config::profile::ProfileFileLoadError),\n    #[error(\"failed to load AWS credentials: {0}\")]\n    Credentials(#[from] aws_credential_types::provider::error::CredentialsError),\n    #[error(\"request URL is not a valid URI: {0}\")]\n    InvalidUri(#[source] http::uri::InvalidUri),\n    #[error(\"failed to construct HTTP request for signing: {0}\")]\n    BuildHttpRequest(#[source] http::Error),\n    #[error(\"request contains a non-UTF8 header value: {0}\")]\n    InvalidHeaderValue(#[source] http::header::ToStrError),\n    #[error(\"failed to build signable request: {0}\")]\n    SigningRequest(#[source] aws_sigv4::http_request::SigningError),\n    #[error(\"failed to build SigV4 signing params: {0}\")]\n    SigningParams(String),\n    #[error(\"SigV4 signing failed: {0}\")]\n    SigningFailure(#[source] aws_sigv4::http_request::SigningError),\n}\n\n/// Loaded AWS auth context that can sign outbound HTTP requests.\n#[derive(Clone)]\npub struct AwsAuthContext {\n    credentials_provider: SharedCredentialsProvider,\n    region: String,\n    service: String,\n}","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/aws-auth/src/lib.rs#L41-L77","documentation":"AwsAuthError variant raised when converting the prepared request parts into the aws-smithy-http request builder failed (e.g. building the http::Request for signing threw). The wrapped builder error is appended; the URL was valid but the request could not be assembled for the signing pipeline.","triggerScenarios":"Thrown at codex-rs/aws-auth/src/lib.rs:59 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Simplify the request (valid headers, no unsupported constructs) so the smithy builder accepts it","Log the builder error detail and fix the request construction site that produced the invalid part"],"exampleFix":null,"handlingStrategy":"try-catch","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"}