-
Notifications
You must be signed in to change notification settings - Fork 154
Bug: API Gateway Console Test button fails validation with @parser envelope ApiGatewayEnvelope because headers
& multiValueHeaders
are null
#2527
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
Thank you for taking the time to open this issue. As I mentioned on Discord from a preliminary investigation the issue seems to be due to another quirk of API Gateway's Test UI, just like #2526. I'll need to investigate more to see if these two fields can be If we go that direction, then I'll add a callout to the docs to record this for future customers. |
sounds good! |
Hi, just wanted to update that I am still waiting for a conclusive answer on the topic. I have however identified the right team to ask the question so hopefully we'll get more clarity soon Thank you for your patience! |
We haven't heard back from the team yet - for now we have marked the fields as |
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. |
Expected Behavior
We should be able to generate a test form the API Gateway console that allows the ApiGatewayProxyEventModel to be validated and parsed by Zod.
Current Behavior
When generating a test from the API Gateway console, the value for the
headers
andmultiValueHeaders
in requestContext -> null. Since this value is defined to be an optionnal but not nullable here And so test events from the API Gateway console fail with a 502 error because of the resulting Zod ValidationError.Code snippet
Steps to Reproduce
Possible Solution
set dummy headers in the UI for testing.
treat it as edge case and mention that the AWS Console ApiGateway UI in moody in the documentation.
Powertools for AWS Lambda (TypeScript) version
latest
AWS Lambda function runtime
20.x
Packaging format used
npm
Execution logs
No response
The text was updated successfully, but these errors were encountered: