Skip to content

fix(parser): cognito schema preferredRole may be null #4259

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

Merged

Conversation

bdellegrazie
Copy link
Contributor

@bdellegrazie bdellegrazie commented Aug 4, 2025

Summary

Changes

For the Cognito Trigger pre-token generation event, handle that the preferredRole
field may be null.

Issue number: closes #4250


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link

boring-cyborg bot commented Aug 4, 2025

Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need.
In the meantime, check out the #typescript channel on our Powertools for AWS Lambda Discord: Invite link

@boring-cyborg boring-cyborg bot added parser This item relates to the Parser Utility tests PRs that add or change tests labels Aug 4, 2025
@pull-request-size pull-request-size bot added the size/S PR between 10-29 LOC label Aug 4, 2025
@bdellegrazie bdellegrazie force-pushed the fix/issue-4250-cognito-trigger branch from 3b5f4e7 to dc0fc56 Compare August 4, 2025 13:01
@bdellegrazie bdellegrazie changed the title fix(schema): cognito preferredRole may be null fix(parser): cognito schema preferredRole may be null Aug 4, 2025
For the Cognito Trigger pre-token generation event, handle that the `preferredRole`
field may be `null`. Fixes aws-powertools#4250
@bdellegrazie bdellegrazie force-pushed the fix/issue-4250-cognito-trigger branch from dc0fc56 to 1c0ea6f Compare August 4, 2025 13:05
Copy link

sonarqubecloud bot commented Aug 4, 2025

Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

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

Thank you for fixing this!

@dreamorosi dreamorosi merged commit 5ef5c85 into aws-powertools:main Aug 4, 2025
35 checks passed
Copy link

boring-cyborg bot commented Aug 4, 2025

Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parser This item relates to the Parser Utility size/S PR between 10-29 LOC tests PRs that add or change tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Zod schema Cognito Trigger Event preferredRole property may be null
2 participants