Skip to content

Instantly share code, notes, and snippets.

@lakshmantgld
Created October 27, 2017 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lakshmantgld/4b56fa389cc477f698a68ce1d5ead7c2 to your computer and use it in GitHub Desktop.
Save lakshmantgld/4b56fa389cc477f698a68ce1d5ead7c2 to your computer and use it in GitHub Desktop.
module.exports.hello = (event, context, callback) => {
const errorResponse = {
message: "Error! Dude You sent the wrong parameters"
};
// Use JSON.Stringify(), else Integration Response
// cannot read your error message.
// If not used, the Integration Response will read
// the response as [Object Object] which will make it
// impossible to detect the status code.
callback(JSON.stringify(errorResponse));
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment