question

newuser-473b96a7-f793-47de-911f-6beba7c481ee avatar image
newuser-473b96a7-f793-47de-911f-6beba7c481ee asked ·

Alexa Skill Endpoint not working after updating Node.js version

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.


alexa skills kitlambdanode_jsnodejs
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Amazon_Bernardo Bezerra avatar image
Amazon_Bernardo Bezerra answered ·

Hi and thank you for your message.

Could you please share the error message that is being printed in your logs as well as your skill ID?

Regards,
Barry

10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.