Closed purkhusid closed 3 weeks ago
I think this is good in principle, but just unsure what the behaviour with key attributes should be - if the SDK throws an exception or (more likely but less preferable) AWS returns a sensible error response. Can we get a couple of tests for that?
Another option might be trapping empty strings in the TableKey
factory methods (there are just null
checks there now) - I think that would cover off all the scenarios we care about.
Another option might be trapping empty strings in the
TableKey
factory methods (there are justnull
checks there now) - I think that would cover off all the scenarios we care about.
Good thinking, I'll add the tests and validation in the TableKey.
@samritchie Added tests for empty strings in key values. Decided not to do the validation in this library since the error from the DynamoDB client is good.
What?
DynamoDB has supported empty strings for non-key attributes since mid 2020: https://aws.amazon.com/about-aws/whats-new/2020/05/amazon-dynamodb-now-supports-empty-values-for-non-key-string-and-binary-attributes-in-dynamodb-tables/