Search code examples
amazon-web-servicesalexa-skills-kitalexa-voice-service

How to change failure message for Alexa?


I want to change the default failure message in Alexa, Sorry, I'm having trouble accessing your {} skill right now.


Solution

  • You cannot change that prompt but you can code to avoid that as much as possible. The error happens when Alexa is not able to get a valid response from your skill endpoint. There can be multiple reasons to that as mentioned here

    1. Your endpoint is giving an invalid response

    This can be due to the errors/exceptions happening in your endpoint code. You can make sure that error/exceptions don't occur and if they occur, thre is code to catch them and provide a valid response back to Alexa, with an error message of your choice.

    2. Your endpoint availability

    Make sure that your endpoints are available all the time if you have configured them as an endpoint. This is pretty much guaranteed if you are using Lambda endpoints. But if you are your own hosted web service endpoint, then you must put in all the measures to keep it available for Alexa to communicate with it.

    3. Your endpoint response time

    Make sure that your endpoint gives back the response within the time period that Alexa expects it to get(guess its 10 seconds). Also make sure if you are using Lambda functions, you have configured them with reasonable execution time to avoid timeout errors.

    If you cover the exception/error/availability scenarios well then you can avoid the default error message as much as possible.