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.
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