Skip to content

Expose CancellationReasons for TransactionCanceledException #1143

@ikonst

Description

@ikonst

This allows to programmatically determine which item failed and for what reason. The alternative of parsing the human-readable error message is obviously worse.

The response looks like this:

{
  "__type": "com.amazonaws.dynamodb.v20120810#TransactionCanceledException",
  "CancellationReasons": [
    {
      "Code": "ConditionalCheckFailed",
      "Message": "The conditional request failed"
    },
    {
      "Code": "ConditionalCheckFailed",
      "Message": "The conditional request failed"
    }
  ],
  "Message": "Transaction cancelled, please refer cancellation reasons for specific reasons [ConditionalCheckFailed, ConditionalCheckFailed]"
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions