Created
October 27, 2017 15:27
-
-
Save lakshmantgld/4b56fa389cc477f698a68ce1d5ead7c2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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