Skip to content

fix(serverless): gracefully fail with 400 for null body#38

Merged
gr2m merged 2 commits intoprobot:masterfrom
decompil3d:no-action
Sep 17, 2020
Merged

fix(serverless): gracefully fail with 400 for null body#38
gr2m merged 2 commits intoprobot:masterfrom
decompil3d:no-action

Conversation

@decompil3d
Copy link
Copy Markdown
Contributor

It is apparently possible to get a null event.body from API Gateway. Right now, this leads to a TypeError at this console.log statement due to the access of event.body.action. This PR adds logic to gracefully fail early with a 400 error.

@decompil3d
Copy link
Copy Markdown
Contributor Author

@JasonEtco any chance you can help get this looked at? Thanks!

Comment thread package.json Outdated
@decompil3d decompil3d requested a review from JasonEtco August 25, 2020 16:29
Copy link
Copy Markdown
Contributor

@gr2m gr2m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cheers!

@gr2m gr2m merged commit 6e689c7 into probot:master Sep 17, 2020
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 0.5.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants