Repository navigation
fix(server): send Message on the two errors the service sends it on - #774
Open
LeeroyHannigan wants to merge 1 commit into
Open
LeeroyHannigan wants to merge 1 commit into
LeeroyHannigan wants to merge 1 commit into
Conversation
error_response wrote every error message under a lower-case message key. Amazon DynamoDB sends Message on TransactionCanceledException and IdempotentParameterMismatchException, and message on every other error measured. botocore reads either key, but a client that reads the modeled Message member of those two errors from the raw body found nothing. The key now comes from message_key, which picks Message for those two errors and message for every other one. TransactionInProgressException also models its member as Message; it was not measured and ExtendDB does not raise it, so it keeps message. REQ-ERR-002 and the doc comment of error_response name the key. A unit test, in response_tests.rs, checks the top-level keys of the body error_response sends for both errors and for three others. tests/test_error_message_key.py reads the raw body from botocore's before-parse event for a cancelled transaction, an idempotency token reused with different parameters, a failed condition and a validation error. It passes against Amazon DynamoDB in us-east-1 and against this change; against a build of main the two Message tests fail. The token mismatch text, which #760 also reports, is left to #526. Part of #760.
LeeroyHannigan
requested review from
amrith,
c33howard,
eliseong,
hitesh96db,
jcshepherd,
pdf-amzn,
robinnsc and
yesyayen
as code owners
November 3, 2026 01:47
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.
error_responsewrote every error message under a lower-casemessagekey. Amazon DynamoDB sendsMessageonTransactionCanceledExceptionandIdempotentParameterMismatchException, andmessageon every other error measured. botocore reads either key, but a client that reads the modeledMessagemember of those two errors from the raw body found nothing.Measurement
Amazon DynamoDB, us-east-1, raw body of a
TransactWriteItemswhose only member is a failingConditionCheck, 3 November 2026, twice with the same answer:{"__type":"com.amazonaws.dynamodb.v20120810#TransactionCanceledException","CancellationReasons":[{"Code":"ConditionalCheckFailed","Message":"The conditional request failed"}],"Message":"Transaction cancelled, please refer cancellation reasons for specific reasons [ConditionalCheckFailed]"}#760 has the 29 October bodies of both errors, and the other errors captured that day with
message.Change
message_key, which picksMessagefor those two errors andmessagefor every other one.TransactionInProgressExceptionalso models its member asMessage. It was not measured and ExtendDB does not raise it, so it keepsmessage.docs/design/01-requirements.mdand the doc comment oferror_responsename the key.The token mismatch text, which #760 also reports, is left to #526, so this pull request is part of #760 and does not close it.
Tests
response_tests.rschecks the top-level keys of the bodyerror_responsesends for both errors and forValidationException,ConditionalCheckFailedExceptionandTransactionConflictException. It sits in its own file so that it does not collide with the test module feat(core): throttle errors carry the service's ThrottlingReasons #532 adds at the end ofresponse.rs.tests/test_error_message_key.pyreads the raw body from botocore'sbefore-parseevent for a cancelled transaction, an idempotency token reused with different parameters, a failed condition and a validation error.Testing
cargo +1.97.0 fmt --all -- --checkandcargo +1.97.0 clippy -p extenddb-server --all-targets -- -D warnings: clean.cargo +1.88.0 test --locked -p extenddb-server: 251 passed.tests/test_error_message_key.py: 4 passed against Amazon DynamoDB in us-east-1 and 4 passed against asqlite-memory,dev-modebuild of this branch. Against a build of main, the twoMessagetests fail.response.rsmerges without conflicts with feat(core): throttle errors carry the service's ThrottlingReasons #532 and fix(dev-mode): refuse browser and admin requests for a foreign host #635.Part of #760.