Pular para o conteúdo
Português (BR)

isConditionalCheckFailed

Este conteúdo não está disponível em sua língua ainda.

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 / UpdateItem throws ConditionalCheckFailedException;
  • a TransactWriteItems throws TransactionCanceledException, and the reason has to be dug out of CancellationReasons — 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.

unknown

boolean