generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 176
Closed
Labels
bugSomething isn't workingSomething isn't workingcompletedThis item is complete and has been merged/shippedThis item is complete and has been merged/shippedevent-handlerThis item relates to the Event Handler UtilityThis item relates to the Event Handler Utility
Description
Expected Behavior
The isAPIGatewayProxyEvent
function should handle events where fields such as headers
or multiValueHeaders
are null
.
Current Behavior
Currently we throw an exception when events of sort described above, which are valid, are recieved.
Code snippet
This valid event fails
const valid event = {
"resource": "/{proxy+}",
"path": "/test",
"httpMethod": "GET",
"headers": null,
"multiValueHeaders": null,
"queryStringParameters": null,
"multiValueQueryStringParameters": null,
"pathParameters": {
"proxy": "test"
},
"stageVariables": null,
"requestContext": {
"resourceId": "ovdb9g",
"resourcePath": "/{proxy+}",
"httpMethod": "GET",
"extendedRequestId": "QpFAfF5hDoEFjTw=",
"requestTime": "09/Sep/2025:15:59:11 +0000",
"path": "/{proxy+}",
"accountId": "account-id",
"protocol": "HTTP/1.1",
"stage": "test-invoke-stage",
"domainPrefix": "testPrefix",
"requestTimeEpoch": 1757433551599,
"requestId": "eecdfcfa-225a-4ee3-bdca-05fc31b6018a",
"identity": {
// ...
},
"domainName": "testPrefix.testDomainName",
"apiId": "einxngk45i"
},
"body": null,
"isBase64Encoded": false
}
Steps to Reproduce
- Supply an event as described above to the
isAPIGatewayProxyEvent
function
Possible Solution
No response
Powertools for AWS Lambda (TypeScript) version
latest
AWS Lambda function runtime
22.x
Packaging format used
npm
Execution logs
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcompletedThis item is complete and has been merged/shippedThis item is complete and has been merged/shippedevent-handlerThis item relates to the Event Handler UtilityThis item relates to the Event Handler Utility
Type
Projects
Status
Shipped