Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process of lambda function response behaves differently Netlify Dev and actual deploy #977

Closed
peter-wd-1 opened this issue Jul 3, 2020 · 0 comments · Fixed by #978
Closed
Labels
type: bug code to address defects in shipped code

Comments

@peter-wd-1
Copy link
Contributor

peter-wd-1 commented Jul 3, 2020

- Do you want to request a feature or report a bug?
Bug

- What is the current behavior?
When I deploy the Lambda function from Neltiy it returns a response ok, while it returns an error in netlify dev:
[91m◈�[39m Function invocation failed: Incorrect function response body
I asked this issue on the community but the answer doesn't' really help much.

- If the current behavior is a bug, please provide the steps to reproduce.
You can reproduce the error by following this tutorial.

Once you follow the first part of the tutorial. Use netilfy dev for testing if the message can be sent to slack.
And also do the same after deploy the app on Netlify.

- What is the expected behavior?
Both dev and Netlify deployed app should send a request and receive the same response.

- Local Environment Information.
────────────────────┐
Environment Info │
────────────────────┘

System:
OS: macOS High Sierra 10.13.6
CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
Binaries:
Node: 12.17.0 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.5 - /usr/local/bin/npm
Browsers:
Chrome: 83.0.4103.116
Safari: 11.1.2
npmGlobalPackages:
netlify-cli: 2.57.0

netlify-cli/2.57.0 darwin-x64 node-v12.17.0

peter-wd-1 added a commit to peter-wd-1/cli that referenced this issue Jul 3, 2020
@RaeesBhatti RaeesBhatti added the type: bug code to address defects in shipped code label Jul 3, 2020
@peter-wd-1 peter-wd-1 changed the title Process of lambda function response behaves differently deployed lambda dev and deploy environment Process of lambda function response behaves differently Neltify Dev and actual deploy Jul 3, 2020
@ehmicky ehmicky changed the title Process of lambda function response behaves differently Neltify Dev and actual deploy Process of lambda function response behaves differently Netlify Dev and actual deploy Jul 3, 2020
RaeesBhatti added a commit that referenced this issue Jul 6, 2020
* fix #977 change request body validation

* Formatting

* Dont attempt to write when no body

* Add test for function with no body

Co-authored-by: Raees Iqbal <raees.bhatti@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants