You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When working with the ApiGatewayEnvelope and ApiGatewayV2Envelope I should be able to extract the message body regardless of whether it's a plain text string, base64-encoded string, or a JSON-stringified one.
Current Behavior
When the message body is not a JSON-stringified object the envelope throws a runtime error as it's unable to parse it with JSON.parse().
dreamorosi
added
confirmed
The scope is clear, ready for implementation
parser
This item relates to the Parser Utility
and removed
triage
This item has not been triaged by a maintainer, please wait
labels
Jan 22, 2025
Expected Behavior
When working with the
ApiGatewayEnvelope
andApiGatewayV2Envelope
I should be able to extract the message body regardless of whether it's a plain text string, base64-encoded string, or a JSON-stringified one.Current Behavior
When the message body is not a JSON-stringified object the envelope throws a runtime error as it's unable to parse it with
JSON.parse()
.Code snippet
Steps to Reproduce
Send a request with a body that is either plain text or an encoded binary.
Possible Solution
No response
Powertools 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: