Skip to content

Handel Response codes as exceptions - #34

Open
anderjo4 wants to merge 5 commits into
cagataygurturk:masterfrom
simonsoft:responseCodes
Open

Handel Response codes as exceptions#34
anderjo4 wants to merge 5 commits into
cagataygurturk:masterfrom
simonsoft:responseCodes

Conversation

@anderjo4

Copy link
Copy Markdown

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