question

dusares avatar image
dusares asked

One Intent not recognized & Unhandled Intent not called

Hi everyone,

I am trying to work on a skill which already has multiple working intents.

However as I am trying to add another very basic intent,I get into trouble.

{
  "errorMessage": "No 'Unhandled' function defined for event: Unhandled",
  "errorType": "Error",
  "stackTrace": [ {
    "AlexaRequestEmitter.EmitEvent (/var/task/node_modules/alexa-sdk/lib/alexa.js:213:15)",

So the new intent "retrieveAddress" is not called. But also it is not correctly calling the Unhandled event.

  var handlers = {
    'LaunchRequest': function () {
      this.emit(':tell',this.t('SAY_HELLO_MESSAGE'));
    },
    'retrieveAddress': function () {
      this.emit(':tell',this.t('SAY_HELLO_MESSAGE'));
    },
    'Unhandled': function () {
      this.emit(':tell',this.t('HELP_MESSAGE'));
    },
    'GetPOIs': function () {
      .... -> not so important, removed some lines of code
    },
    'carReturn': function () {
      sendCarReturn(function(){
        console.log("Email Sent for car return!");
        this.emit(':tell', this.t('CAR_RETURN_MESSAGE'));
      }.bind(this));
    }
  };


I have looked everywhere for a solution, but I cannot find any reason why the new event is not working. The same JSON request works for carReturn or for LaunchRequest, also getPOIs works without any trouble. I even changed the name from "getAddress" to "retrieveAddress" to make sure that I am not interfering with some system functions.

I would be happy if someone could help.

BR

Alex

alexa skills kitskillintentsnode_js
10 |5000

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

1 Answer

dusares avatar image
dusares answered

Okay this might be stupid, but I found out what was causing the problem and rather give an update than delete the question.

I cloned the git repository a second time a while ago.

Came out, that I constantly edited the copy while uploading the original file.

Therefore all changes that I made were not having any effect on the lambda function. /facepalm

Anyway, I found it out. And if anyone experiences this error.

Check that you are working on the correct files! :D

10 |5000

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