claudiajs / claudia-api-builder

Use AWS API Gateway as if it were a lightweight JavaScript web server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for ApiResponse customization in intercept()

pmarkert opened this issue · comments

I was surprised to find that api.intercept() did not handle custom errors/responses, but instead always returned 500 Internal Server Error. I had expected that if I threw an instance of ApiResponse, that it would use the status, body, and headers, but instead the handler passes the value as-is to the error parameter on the lambda callback.

implemented by #24