Closed josephchan91 closed 6 years ago
As you're using the express wrapper, this is a problem with aws-serverless-express, not with claudia, so it's best to ask there (https://github.com/awslabs/aws-serverless-express).
If you're building an API instead of a web site, I suggest using the claudia-api-builder, that supports promises returning from handlers nicely, so you just need to return the promise out in order for it to wait for execution (but make sure you're running the lambda with node8.10, earlier versions do not support awaits)
I'm using lambda to implement a small utility app that interacts with Shopify using this package. However, calling a promise-returning method of the library seems to cut short the execution of the function. It worked fine before I migrated it from Webtask and when testing locally. The code within my express function looks like this:
These are the error logs I'm getting:
CloudWatch log:
{"message": "Internal server error"}
API Gateway log:
Execution failed due to configuration error: Malformed Lambda proxy response
Does anyone know what could possibly be going on? I've trying the statement in a try/catch but am not getting any errors from CloudWatch either.