-
-
Notifications
You must be signed in to change notification settings - Fork 789
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Environment
Nuxt 3.0.0-rc.9 with Nitro 0.5.0
Reproduction
I build the Nuxt app with aws-lambda deployment setting and configured Amazon API Gateway proxy integration to work with this lambda function.
When I call my endpoint, I receive a configuration error and an HTTP 502 status code.
Execution failed due to configuration error: Malformed Lambda proxy response
Describe the bug
As I commented in the PR (#357 (comment)), this is due to the fact that cookies are returned in the response object.
For API Gateway to handle a Lambda function's response, the function must return output according to the following JSON format. Additional fields are not allowed.
{
"isBase64Encoded": true|false,
"statusCode": httpStatusCode,
"headers": { "headerName": "headerValue", ... },
"body": "..."
}
cf. https://aws.amazon.com/premiumsupport/knowledge-center/malformed-502-api-gateway/?nc1=h_ls
Additional context
Related Issues and PRs are as follows.
- fix(aws-lambda): return outgoing cookies on response objects #357
- aws-lambda preset should use cookies vs set-cookie header in response #245
Logs
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working