JuliusBrussee/caveman · error
bedrock: could not build signing request: %w
Error message
bedrock: could not build signing request: %w
What it means
Error "bedrock: could not build signing request: %w" thrown in JuliusBrussee/caveman.
Source
Thrown at proxy/providers/bedrock/signing.go:85
// already-resolved upstream (which honors a per-project base URL); re-resolving
// here with an empty route would sign the adapter's fallback host instead, so a
// project with a custom Bedrock endpoint would get a SigV4 Host mismatch
// (SignatureDoesNotMatch). Fall back to a self-resolve only if the caller passed
// nil (no forward URL available).
if upstream == nil {
upstream, err = a.ResolveUpstreamURL(ctx, req, providers.RouteContext{})
if err != nil {
return nil, err
}
}
// Build a synthetic request carrying the upstream host/path/query and the
// to-be-signed headers, sign it, then merge the signed headers into out. This
// keeps the signing surface (host, path, query, x-amz-*) identical to what the
// proxy actually sends upstream.
toSign, err := http.NewRequestWithContext(ctx, req.Method, upstream.String(), nil)
if err != nil {
return nil, fmt.Errorf("bedrock: could not build signing request: %w", err)
}
toSign.Header = out.Clone()
signingService := runtimeService
if mantle {
signingService = mantleService
}
payloadHash, err := requestPayloadHash(ctx, req)
if err != nil {
return nil, err
}
signer := awssig.Signer{Region: signingRegion(req, upstream), Service: signingService}
if err := signer.Sign(toSign, creds, payloadHash, time.Now()); err != nil {
// The error from Sign never contains the secret (see awssig docs); still,
// return a generic mapping error rather than the raw text.
return nil, fmt.Errorf("bedrock: request signing failed")
}
View on GitHub (pinned to 27d5a3981a)
Solutions
- Fix the signing request construction error.
When it happens
Trigger: Thrown at proxy/providers/bedrock/signing.go:85 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15).
Data as JSON: /api/errors/8616d0cb15cc3295.
Report an issue: GitHub.