I created Serverless framework's function by command below:
sls function create some/api
Then schelton code was created:
'use strict';
module.exports.handler = function(event, context, cb) {
  return cb({
    message: 'Go Serverless! Your Lambda function executed successfully!'
  });
};
and, response template is like below:
s-function.json
  "responses": {
    "400": {
      "statusCode": "400"
    },
    "default": {
      "statusCode": "200",
      "responseParameters": {},
      "responseModels": {
        "application/json;charset=UTF-8": "Empty"
      },
      "responseTemplates": {
        "application/json;charset=UTF-8": ""
      }
    }
  }
But, when I returned error object to callback function like cb(err, null), then error message was properly shown, but statusCode is 200.
If I changed to call callback function like cb("400", err), then statusCode properly returns 400, but response body is not good: {"errorMessage":"400"}.
Are there any good settings to show bot statusCode(Not only 400, but also 401,403,404,500...and so on) and error messages?
 
    