Having an issue with the LaunchRequest when starting the skill with no intent I get a generic error:
2021-12-13T14:27:57.925Z 60f31e0d-3eeb-4790-9bb9-7c4a6dde7632 INFO Error handled: TypeError: Cannot read property 'name' of undefined
There are three interceptors which load and run with no errors.
When I start the skill with the a request for help the code runs as expected.
const HelpIntentHandler = {
canHandle(handlerInput) {
return handlerInput.requestEnvelope.request.type === 'LaunchRequest' ||
(handlerInput.requestEnvelope.request.type === 'IntentRequest'
&& handlerInput.requestEnvelope.request.intent.name === 'AMAZON.HelpIntent')
},
handle(handlerInput) {
console.log("Launch");
const speechText = handlerInput.t('HELP_MSG', {URL: resources.Church.URL_SPOKEN});
return handlerInput.responseBuilder
.speak(speechText)
.reprompt(handlerInput.t('HELP_PROMPT_MSG'))
.getResponse();
},
};