Hi,
how do I return error on aws lambda using node
I tried the code from document but its returning statuscode 200 and I dont see error message anywhere in the response
There are two ways to integrate the API Gateway and Lambda. The default used by Serverless is Lambda Proxy Integration. For that you need to return an object telling the API Gateway how to respond. It’s the easiest to use so if you’re new I’d recommend sticking to it.
The more complicated Lambda Integration uses the callback error parameter to trigger different responses.