My Alexa skill has been functioning correctly for nearly a year now. It uses a Lambda function as an endpoint and queries DynamoDB. Since updating the Node runtime version none of it works. I've even reduced the whole endpoint function down to this:
const Alexa = require('ask-sdk'); const LaunchRequestHandler = { canHandle(handlerInput) { return handlerInput.requestEnvelope.request.type === 'LaunchRequest'; }, handle(handlerInput) { const speechText = 'Hello there.'; const repromptText = 'What would you like to do? '; return handlerInput.responseBuilder .speak(speechText) .reprompt(repromptText) .getResponse(); }, }; const ErrorHandler = { canHandle() { return true; }, handle(handlerInput, error) { console.log(`~~~~ Error handled: ${error.stack}`); const speakOutput = "Failed."; return handlerInput.responseBuilder .speak(speakOutput) .reprompt(speakOutput) .getResponse(); } }; exports.handler = Alexa.SkillBuilders.custom() .addRequestHandlers( LaunchRequestHandler ) .addErrorHandlers( ErrorHandler, ) .lambda();
All I get is the error handler telling me it's failed. Any help would be very much appreciated.