-
-
Notifications
You must be signed in to change notification settings - Fork 796
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
Parsing [XXX] in error messages, to match serverless 1.0 #133
Conversation
Hi @marccampbell, thanks a lot for the PR. |
@marccampbell Ok I merged the integrations PRs #129 and #131. Can you fix the conflicts please? Extra kudos if you write some tests 👍, thanks |
159fd64
to
cfe6c3f
Compare
@marccampbell Is this ready? I can merge it today |
@dherault @marccampbell I've tested this and I think it is ok. IE:
But we should be returning only the errorMessage:
I'll merge it and then change adapt the string response. Thanks! |
Thanks guys, super awesome! |
Oh right, forgot to say: v3.3.0 ;) |
This fixes #108
There are a few ways this could be accomplished. Is this an acceptable solution?
This isn't a significant change, but when an error message is being returned from a serverless handler, if there's a "[XXX] Message" in the response, the status code on the response object will be set from this error object.
It makes no attempt to response the different patterns that serverless supports with API Gateway. I feel that this is out of scope of this PR and could be an interesting option by itself.