In my lambda I am trying to throw custom error if some logic is incorrect.
I had tried: callback(err)
, throw new Error(err)
It returned the error object, but am not able to update the HTTP response code:
i.e.: I want to show
500
instead of 200 OK
.
Also in my AWS Integration Response, I have declared the response types.