In current situation, if you do this;
response.status(500).end();
requester will get Internal server error but this will be logged as a successful response on Lambda side. I'm not completely sure what is the best practice for this but I feel that, 5XX statuses should be reported as errors on Lambda level too. Because that kind of errors should mean pointing a coding issue in Lambda function.
For now, the only place that we report an error on lambda level is in lambda-wrapper.js function(use function).
In current situation, if you do this;
requester will get
Internal server errorbut this will be logged as a successful response on Lambda side. I'm not completely sure what is the best practice for this but I feel that, 5XX statuses should be reported as errors on Lambda level too. Because that kind of errors should mean pointing a coding issue in Lambda function.For now, the only place that we report an error on lambda level is in lambda-wrapper.js function(
usefunction).