Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DynamoDB: transact_write_items does not return Item in CancellationReasons #7523

Closed
EmmaStott opened this issue Mar 26, 2024 · 2 comments
Closed
Labels
debugging Working with user to figure out if there is an issue

Comments

@EmmaStott
Copy link

EmmaStott commented Mar 26, 2024

moto 5.0.3 does not return Item under err.response["CancellationReasons"][n] when a transaction fails, despite setting "ReturnValuesOnConditionCheckFailure": "ALL_OLD"

This appears to be a regression of #5204

Comparing 970aee3 to the latest version https://github.com/getmoto/moto/blob/master/moto/dynamodb/exceptions.py#L232-L256, it looks like the fix was dropped somewhere along the line.

@bblommers
Copy link
Collaborator

Hi @EmmaStott! We have a unit test for this, which asserts that we do return the item:

def test_transact_write_items_failure__return_item(table_name=None):

Can you share a reproducible test case where it is not being returned?

@bblommers bblommers added the debugging Working with user to figure out if there is an issue label Mar 26, 2024
@bblommers
Copy link
Collaborator

Going to close this due to a lack of response - if there is a reproducible case I'd be happy to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debugging Working with user to figure out if there is an issue
Projects
None yet
Development

No branches or pull requests

2 participants