-
-
Notifications
You must be signed in to change notification settings - Fork 798
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
lambda integration: all responses are empty due to default template file containing newline. #284
Comments
OK some more info here. The manual_test helloLambdaIntegration funcs work due to a bug in the implementation. If we go through the example, and call the above func: serverless-offline/src/index.js Line 671 in 889b640
And Which fails the test in serverless-offline/src/index.js Line 673 in 889b640
Whereas in my case, I defined the response headers application/json in serverless.yml, and perhaps because of this, the default template (newline) got associated and responseTemplate looks like this:
which passes the above test, triggers template mapping and then fails to return data because the newline is not a valid template. I'm going to submit the quick fix of removing the newline from the default mapping. I will also add a newline check for the template check above because the newline in the template file could easily be re-introduced via some linter (probably was in the first place). But it would be good to check the general implementation as well aside from those fixes. |
Hi, I'm back from holidays. Thank you for your patience. I'll review all the issues and PRs in the upcoming days and will ship asap. |
Thanks @bebbi ! |
I'm using lambda integration.
My responses are all newlines only instead of the lambda response data.
I've tracked this down to this projects
offline-default.res.vm
file to contain only a newline.I'd be happy to PR the correct default template into this file, but I don't know where to source it.
The text was updated successfully, but these errors were encountered: