Skip to content

Commit 33c654c

Browse files
committed
Fix error response
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
1 parent 3f06165 commit 33c654c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lambda-function.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ async function lambdaFunction(probot, event, context) {
2525
} catch (error) {
2626
return {
2727
statusCode: error.status || 500,
28-
error: "ooops",
28+
body: "Error processing GitHub Event",
2929
};
3030
}
3131
}

0 commit comments

Comments
 (0)