Repository navigation
fix(gateway): say a refusal without an exception name in its own sentence - #231
Merged
Merged
Conversation
…ence
When AWS refused a Bedrock credential without naming the exception, the
refusal filled the English phrase "no exception name" into the `{kind}`
slot of `gw.upstream.bedrock_refused`, so a translated interface showed
an untranslated fragment. That case now has its own code and sentence,
`gw.upstream.bedrock_refused_unnamed`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
fylorn
added a commit
that referenced
this pull request
Sep 29, 2026
Minor release for #223, #224, #226, #227, #228, #229, #230 and #231, and #222 before them. - Bump the workspace version to 0.55.0 - release-notes/0.55.0.md Control-plane protocol 28 (was 27): the protocol `bedrock`, ProviderInput.aws / ProviderView.aws (AwsKeys), ProviderView.region, ProviderPreview.region and AttemptView.model. The request store schema is unchanged (22), so the request history is kept. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When AWS refuses a Bedrock credential without naming the exception (no
x-amzn-ErrorType, no__typein the body),gw.upstream.bedrock_refusedfilled the English phraseno exception nameinto its{kind}argument. A translated interface then shows an untranslated fragment inside its sentence, which breaks the rule that a message code is one sentence and never a template filled with English words.That case now has its own code and sentence,
gw.upstream.bedrock_refused_unnamed(… (HTTP {status}). Check that the credential is valid …). The named case is unchanged.Verification:
cargo fmt --checkandcargo clippy -p tw-gateway --all-targets -D warningsare clean, andtests/bedrock.rspasses (13 tests). The new end-to-end test sends a 403 without an exception name and checks the sentence, and that the account ID stays out.msg-codes.txtis regenerated.🤖 Generated with Claude Code