Skip to content

feat: support returnOnConditionCheckFailure on write operations#552

Open
anatolzak wants to merge 1 commit intotywalch:masterfrom
anatolzak:worktree-electrodb-conditional-check-typing
Open

feat: support returnOnConditionCheckFailure on write operations#552
anatolzak wants to merge 1 commit intotywalch:masterfrom
anatolzak:worktree-electrodb-conditional-check-typing

Conversation

@anatolzak
Copy link
Contributor

closes #551

Add returnOnConditionCheckFailure: "all_old" option to go() for write operations (put, create, update, patch, delete, remove, upsert). When a condition expression fails, returns { rejected: true, data: existingItem } instead of throwing, using DynamoDB's ReturnValuesOnConditionCheckFailure.

Includes TypeScript types, integration tests (v2 + v3), params tests, and docs.

Add `returnOnConditionCheckFailure: "all_old"` option to `go()` for write
operations (put, create, update, patch, delete, remove, upsert). When a
condition expression fails, returns `{ rejected: true, data: existingItem }`
instead of throwing, using DynamoDB's `ReturnValuesOnConditionCheckFailure`.

Includes TypeScript types, integration tests (v2 + v3), params tests, and docs.
@netlify
Copy link

netlify bot commented Mar 6, 2026

Deploy Preview for electrodb-dev ready!

Name Link
🔨 Latest commit 3046364
🔍 Latest deploy log https://app.netlify.com/projects/electrodb-dev/deploys/69aac6882aad4900087e2cb3
😎 Deploy Preview https://deploy-preview-552--electrodb-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support ReturnValuesOnConditionCheckFailure on write operations

1 participant