Skip to content
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

Bad validation on Global Secondary Indexes #184

Open
reconbot opened this issue May 20, 2024 · 0 comments
Open

Bad validation on Global Secondary Indexes #184

reconbot opened this issue May 20, 2024 · 0 comments

Comments

@reconbot
Copy link
Member

Describe the issue
I added a global secondary index in development using Dynalite and when I went to production I had issues because I wasn't always providing data for the hashkey in the GSI. However the value wasn't undefined but instead an empty string.

In development it didn't care, in production I got this error on put;

One or more parameter values are not valid. A value specified for a secondary index key is not supported. The AttributeValue for a key attribute cannot contain an empty string value. IndexName: gsi2, IndexKey: gsi2pk

Steps to reproduce
Steps to reproduce the behavior:

  1. create a table with a global secondary index with string hash and sort keys
  2. put a record that's got empty string values for those fields
  3. Look to get an error, but get a successful put

Expected behavior
An error on put

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

No branches or pull requests

1 participant