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

Update DynamoDB.Decoder to handle binary strings #61

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gregggreg
Copy link

DynamoDBEvent.Decoder isn't currently handling the case where .binary attributes are base64encoded strings and throws an error

Motivation:

If you try to use DynamoDBEvent.Decoder on binary values, it throws an error saying it is expecting the value to be a string

Modifications:

Decoding string values now handles the case where they are .binary as well

Result:

If you have a DynamoDB record with binary values, you will be able to use DynamoDBEvent.Decoder to properly decode it without an error being thrown

@sebsto
Copy link
Contributor

sebsto commented Nov 7, 2024

Thank you @gregggreg
Can you add a unit test to cover this change ?

Copy link
Contributor

@sebsto sebsto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but I would like to add a unit test to cover this change

@sebsto sebsto added the 🆕 semver/minor Adds new public API. label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🆕 semver/minor Adds new public API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants