Could not find the route "ON_ERROR" in your handler function

amazon-alexa

#1

Received this during playback on Amazon Echo Show (2nd Gen).

Any ideas on how to resolve this error?

My first impulse was to add the Unhandled() Intent.

No dice.

I have included more details on the error and my Unhandled() function code.

Error:
 Error -----------------------------------------------------------------
  
  Code:
  ERR_NO_ROUTE
  
  Message:
  Could not find the route "ON_ERROR" in your handler function.
  
  Stack:
  Error: Could not find the route "ON_ERROR" in your handler function.
      at Function.applyHandle (/home/pat/Projects/.../src/plugins/Handler.ts:163:15)
      at handle (/home/pat/Projects/.../node_modules/jovo-core/src/plugins/Handler.ts:239:19)
      at Middleware.run (/home/pat/Projects/.../node_modules/jovo-core/src/core/Middleware.ts:85:11)
      at App.handle (/home/pat/Projects/.../node_modules/jovo-core/src/core/BaseApp.ts:274:7)
      at App.handle (/home/pat/Projects/.../node_modules/jovo-framework/src/App.ts:332:5)
      at /home/pat/Projects/.../src/index.js:20:9
  
  Module:
  jovo-framework
  
   ----------------------------------------------------------------------

My Unhandled() Function

Unhandled() {
        this.toStatelessIntent("LAUNCH");
    },

#2

Alexa send Error requests when a response from your Skill isn’t correct. To handle these error requests, you need to add ON_ERROR to your handler. Learn more here: https://www.jovo.tech/docs/routing/intents#on_error

You should be able to see the error request in your terminal, one request before the error message you just posted. This contains the reason for the error, which should be helpful with debugging.

One idea: Did you press any buttons on Echo Show? I’ve seen this error before in relation to PlaybackController requests where the Skill tried to send back a speech response, which isn’t allowed.


#3

Hey Jan,

ON_ERROR is very helpful!

Had no idea that built-in intent existed!

Thanks for your community insight as always :slight_smile: