-
Notifications
You must be signed in to change notification settings - Fork 594
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
A null ExclusiveStartKey produces promise rejection when sending QueryCommand or ScanCommand #3568
Comments
Looks like this is the change that introduced the issue
|
Hi @korostelevm, I'm sorry that this change was breaking for your application. The change made in #3539 fixes and allows non-map values, and indeed falsy values, to be converted correctly in Please leave the key out of your request object when not providing a compatible value. As a second option, use a value of We don't currently plan to add validation, because there is usually no client side runtime type validation. If you use TypeScript with strict null checks, that will block |
Thanks for taking a look, faced the original issue in the past as well. Having to choose between workarounds, I think I'll take this one 😂 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Describe the bug
When sending a query or scan command with a null value for ExclusiveStartKey, the sdk fails with an unhandled promise rejection. Null values were supported before and are often used in pagination code.
If this change was intended, it should produce a ValidationError with an appropriate message.
Your environment
SDK version number
@aws-sdk/client-dynamodb@3.77
@aws-sdk/lib-dynamodb@3.77
Is the issue in the browser/Node.js/ReactNative?
Node.js
Details of the browser/Node.js/ReactNative version
v14.17.0
Steps to reproduce
This code fails with 3.77 but works in 3.53
Observed behavior
A clear and concise description of what happens.
Resulting error
Expected behavior
A clear and concise description of what you were expecting to happen.
Expected it to behave as if ExclusiveStartKey was not provided and scan/query forward at the index start
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: