-
Notifications
You must be signed in to change notification settings - Fork 153
Bug: SnsSchema parsing fails when Subject
is null
#3400
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
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
Hey Nies, thanks for opening the issue! While the fix is easy, I will take a closer look why we missed it in our tests. Feel free to drop a PR, if you like, since you have spotted it first 😁. |
@am29d I just came here because this started happening to me. I'm almost willing to posit that AWS actually changed it because @types/aws-lambda is |
This issue is now closed. Please be mindful that future comments are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so. |
This is now released under v2.12.0 version! |
Expected Behavior
Sns events with a
Subject
that is null should pass schema parsing withSnsSchema
.Current Behavior
For an event like this:
The following fails:
This is due to
Subject
being null. It can be omitted or undefined, but in the case of null it seems to throw. However, it is a valid case for SNS to haveSubject
be null.Code snippet
Steps to Reproduce
Run the codesnippet above and it should fail
Possible Solution
Allow the
Subject
field to be null as well as omittedPowertools for AWS Lambda (TypeScript) version
latest
AWS Lambda function runtime
22.x
Packaging format used
npm
Execution logs
The text was updated successfully, but these errors were encountered: