cagataygurturk / lambadaframework

Build serverless REST API's with JAVA. It implements the JAX-RS API and deploys your application easily to AWS Lambda and API Gateway
MIT License
244 stars 48 forks source link

Handel Response codes as exceptions #34

Open anderjo4 opened 7 years ago

anderjo4 commented 7 years ago

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