Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Alexa = require('ask-sdk');
- const HelloHandler = {
- canHandle(handlerInput) {
- },
- handle(handlerInput) {
- }
- };
- const ErrorHandler = {
- canHandle(handlerInput, error) {
- return true; // Handle all errors
- },
- handle(handlerInput, error) {
- console.log(`Error handled: ${error.message}`);
- console.log(error.trace);
- return handlerInput.responseBuilder
- .speak('Sorry, I can\'t understand the command. Please say again.')
- .getResponse();
- },
- }
- };
- const skillBuilder = Alexa.SkillBuilders.custom();
- exports.handler = skillBuilder
- .addRequestHandlers(
- HelloHandler
- )
- .addErrorHandlers(ErrorHandler)
- .lambda();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement