Repository navigation
docs(core): give HTTP 400 for four auth and operation errors - #1294
Open
LeeroyHannigan wants to merge 1 commit into
Open
LeeroyHannigan wants to merge 1 commit into
LeeroyHannigan wants to merge 1 commit into
Conversation
The doc comments of UnknownOperationException, IncompleteSignature, UnrecognizedClientException and InvalidSignatureException gave HTTP 404 or 403. So did the error catalog and REQ-WIRE-007 in docs/design/01-requirements.md, and the error table of docs/manuals/03-usage-guide.md. status_code in crates/core/src/error/mod.rs returns 400 for these errors. DynamoDB answered the first three with HTTP 400 in us-east-1 on 21 Nov 2026, and InvalidSignatureException with HTTP 400 on 23 Oct 2026. The lines for MissingAuthenticationToken stay as they are, because the fix for #1075 changes them. Fixes #1288.
3 of 8 tasks
LeeroyHannigan
marked this pull request as ready for review
November 23, 2026 11:27
LeeroyHannigan
requested review from
amrith,
c33howard,
demohan,
eliseong,
hitesh96db,
jcshepherd,
navareamol,
pdf-amzn and
robinnsc
as code owners
November 23, 2026 11:27
navareamol
reviewed
Dec 2, 2026
navareamol
left a comment
Collaborator
There was a problem hiding this comment.
The doc comments and docs now match status_code and status_codes_match_sp_err_002 for the four errors, and I found no other place that gives them 403 or 404. Two description points:
- The description says the lines for the missing Authorization header error stay "because #1290 changes them to 400" and that this PR "merges cleanly with #1290". #1290 is already merged into main, so on main those lines are 400. Could you reword that sentence to say the lines are left alone because #1290 already changed them?
- The branch is 40 commits behind main and CI ran on the old base. I think a merge with main is worth doing so CI runs on the combined tree, though a trial merge here has no conflict.
I will approve once the description is corrected and the branch is updated with main.
This branch has not been deployed
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.
What
The doc comments of four
DynamoDbErrorvariants incrates/core/src/error/mod.rsnow give HTTP 400:UnknownOperationException,IncompleteSignature,UnrecognizedClientExceptionandInvalidSignatureException. They gave HTTP 404 or 403.The same statuses change in
docs/design/01-requirements.md(REQ-WIRE-007 and three rows of the error catalog) and in one row of the error table indocs/manuals/03-usage-guide.md.This PR changes no code.
status_codealready returns 400 for these errors, and its unit teststatus_codes_match_sp_err_002asserts 400 for them.The
MissingAuthenticationTokenlines stay as they are, because #1290 changes them to 400.Fixes #1288
Why
DynamoDB answers these errors with HTTP 400:
test_signed_header_repeated_after_signing_is_a_signature_mismatchintests/test_auth_error_fidelity.pyasserts that answer.ExtendDB sends the status that
status_codereturns. So the comments and the docs gave a status that neither ExtendDB nor DynamoDB sends.Testing done
cargo test -p extenddb-core --lib: 1146 passed, 1 ignored.cargo +1.97.0 clippy -p extenddb-core --all-targets -- -D warningsandcargo +1.97.0 fmt --all -- --checkare clean.crates/,docs/,tests/or the top-level files gives these four errors another status than 400.Line counts: doc comments and docs only, +9 -9.
This PR adds no conflict with the open PRs, and it merges cleanly with #1290.
Not in this PR: the error catalog names
IncompleteSignatureby its Rust variant, and it gives "signature mismatch" toUnrecognizedClientException, where ExtendDB answersInvalidSignatureException(#1293).Checklist
cargo test --workspace)cargo fmt --check)cargo clippy -- -W clippy::pedantic)Storagetrait, auth model, on-diskformat, or public CLI surface, an RFC has been accepted or is linked
below. Otherwise, an ADR captures the decision (link below).
ADR / RFC: n/a
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache License 2.0 and I agree to the Developer Certificate of
Origin (DCO). See CONTRIBUTING.md for details.