mapbox / dyno

simple dynamodb client
MIT License
78 stars 31 forks source link

Sets must always be typed #111

Closed rclark closed 8 years ago

rclark commented 8 years ago

Dyno utilizes a Set shim object provided by the aws-sdk. The shim has a bug (https://github.com/aws/aws-sdk-js/issues/801): when the first entry in the provided list is falsy (i.e. '' or 0), the set object has no .type property attached.

When the aws-sdk document client sees this un-typed set in the process of constructing a DynamoDB request, it fails, leading to a request with invalid parameters that fails validation.

This PR is a hotfix right now for a couple of places where dyno encounters this problem explicitly. However it is by no means a complete solution. That'll need to wait for an upstream fix. Leaving this open until that arrives.