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

Handel Response codes as exceptions #34

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

anderjo4
Copy link

As it is now it can only return 200 responses. See Issue: #11
For the API Gateway to return other respons codes we throw exceptions instead.
Given that the exception's message has the response code the Lambda Error RegEx will get a match and handle it as a response with the recived code.

Drawbacks: This solution won't return the entity body in it's repsonse when exception is thrown.

I don't think this is the a optimal solution. Maybe we should look at AWS Lambda Proxy which will make the lambadaframework less complex and probably able to handle other respons codes and return a entity body with it.

AWS Lambda Proxy

Jonathan Andersson added 5 commits October 13, 2016 13:09
…omJaxRSResponse method to be catched and handled by Errorhandler
…ay will handle the response as a 200. Keeps old returns as comments, may want these if the framework will implement AWS Lambda Proxy
…gument if the StatusCode isen't a success response 2xx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant