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
Getting TypeError: Cannot use 'in' operator to search for 'status' in undefined when my Lambda@Edge handler uses callback(null, response) to return response #344
When I use the Lambda@Edge handler callback(null, response)style of returning the response, I get the error below. It looks like the code is not aware of this style. See snippet farther below from src/services/cloudfront.service.ts. It's only passing event and context, but not a callback, return this.fnSet.originResponse(event, this.context);. Is this functionality that we'd want to add? If the answer is yes and I can carve out some time, I can take a look at submitting a PR for this issue. Thank you.
{"code":500,"message":"TypeError: Cannot use 'in' operator to search for 'status' in undefined\n at Object.isResponseResult (/my-module/node_modules/serverless-offline-edge-lambda/dist/utils/is-response-result.js:5:21)\n at CloudFrontLifecycle.<anonymous> (/my-module/node_modules/serverless-offline-edge-lambda/dist/services/cloudfront.service.js:100:25)\n at Generator.next (<anonymous>)\n at fulfilled (/my-module/node_modules/serverless-offline-edge-lambda/dist/services/cloudfront.service.js:5:58)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)"}* Closing connection 0