-
Notifications
You must be signed in to change notification settings - Fork 36
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
Fix Lambda Error Handling #91
Conversation
Actually, I have some additional thoughts/questions on this. @gr2m, can we remove the According to the docs linked in my original post:
When the However, when a value of The impact of removing the When When Hopefully that all makes sense. I can elaborate more if necessary. |
No I trust you on this one :) |
Awesome! This all sounds good in theory, but I'd like to test it locally before pushing those changes to this PR. I will try to test later today and update this PR with my findings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awaiting changes as discussed in PR
The `error` field is not valid for an API Gateway response. As noted in the AWS docs below, when an error response contains invalid fields, it will always return a `502` error code with a body of `{"message": "Internal server error"}`. This PR updates the error response fields to contain valid fields and a more sensible response message. - https://docs.aws.amazon.com/lambda/latest/dg/services-apigateway.html#services-apigateway-errors
83a4e7c
to
33c654c
Compare
@gr2m, we should be all set to merge this. I just pushed some changes and tested them locally. The tables below show how Probot errors are interpreted by the respective AWS services on the It was the Lambda column that was messed up prior to these changes.
|
- | Lambda | API Gateway |
---|---|---|
async: false |
does not report errors | does report errors |
async: true |
does not report errors | does not report errors |
fix-error-response
Branch
- | Lambda | API Gateway |
---|---|---|
async: false |
does report errors | does report errors |
async: true |
does report errors | does not report errors |
I closed this to prevent the deletion from getting merged. These changes were included as a part of #111 (see my note in the PR body) |
sweet, thank you! I was just confused about the merge conflicts, now it makes sense |
@gr2m I'll open a PR to fix the style issues that are failing. |
Using a
try
/catch
block prevents Lambda function errors from being properly interpreted by AWS.Removing this block will maintain the existing functionality, but allow Probot errors to be properly propagated to AWS Lambda.