isConditionalCheckFailed
Ce contenu n’est pas encore disponible dans votre langue.
isConditionalCheckFailed(
error):boolean
Defined in: src/persistence/journals/DynamoDbClient.ts:172
A failed conditional write. DynamoDB reports it two ways, and both matter:
- a single conditional
PutItem/UpdateItemthrowsConditionalCheckFailedException; - a
TransactWriteItemsthrowsTransactionCanceledException, and the reason has to be dug out ofCancellationReasons— a transaction is also cancelled for throttling or conflicts, which are retryable and must NOT be mistaken for a concurrency conflict.
This is DynamoDB’s equivalent of SQLSTATE 23505 / MongoDB’s error 11000, and
it is what makes the journal’s optimistic concurrency sound.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”boolean
