code: function finishCallback(callback, f, res) {
    return function callbackWithArgs() {
      const response = f.apply(this, arguments);
      if (res && !isEmptyObject(res.headers)) {
        response.headers = res.headers;
      }
      callback(response);
    };
  }
docs: Formats statusCode, body to be sent as a HTTP response back to Api Gateway.
  The body parameter can be a a String, an object, or an Array.
  @name finishCallback
  @function
  @param {Object} err Caught javascript error
  
  @returns {Object} returns error to api gateway to handle