Skip to content

Instantly share code, notes, and snippets.

@leoaiassistant
Created August 3, 2020 08:23
Show Gist options
  • Save leoaiassistant/ce452420f5a691ce0f52c814e8403722 to your computer and use it in GitHub Desktop.
Save leoaiassistant/ce452420f5a691ce0f52c814e8403722 to your computer and use it in GitHub Desktop.
const ErrorHandler = {
canHandle() {
return true;
},
handle(handlerInput, error) {
console.log(`Error handled: ${error.message}`);
return handlerInput.responseBuilder
.speak('Sorry, I can\'t understand the command. Please say again.')
.reprompt('Sorry, I can\'t understand the command. Please say again.')
.getResponse();
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment