开发者控制台
感谢您的访问。此页面目前仅提供英语版本。我们正在开发中文版本。谢谢您的理解。

Error Handling (VSK Echo Show)

In the event of an error, you should return an error code in the response so that Alexa can take a specific action.

Structure of Error Messages

The payload of an ErrorResponse event must specify a type and a message.

  • type: One of the accepted type values that indicates the kind of error that has occurred. Alexa uses this attribute to respond to the customer appropriately.
  • message: String that provides more information about the error. This information is not shared with the customer.

No Search Results Found

For video skills on multimodal devices, the following error should be used when no search results are found:

Error type Description
CONTENT_NOT_FOUND This value should be used to indicate that no content was found based on the criteria sent in the directive or that the content was not recognized by the content provider.

Example Error: CONTENT_NOT_FOUND

{
    "event": {
        "header": {
            "messageId": "4e02d3c8-85e8-4e32-8a1b-08c1d52122ad",
            "correlationToken": "dFMb0z+PgpgdDmluhJ1LddFvSqZ/==",
            "name": "ErrorResponse",
            "namespace": "Alexa.Video",
            "payloadVersion": "3"
        },
        "endpoint": {
            "scope": {
                "type": "DirectedUserId",
                "directedUserId": "access-token-from-Amazon"
            },
            "endpointId": "videoDevice-001"
        },
        "payload": {
            "message": "optional information about the error that will be logged by Alexa",
            "type": "CONTENT_NOT_FOUND"
        }
    }
}

Error Types

The following table lists all the options for type.

Type Description
CONTENT_NOT_FOUND This value should be used to indicate that no content was found based on the criteria sent in the directive or that the content was not recognized by the content provider.
INVALID_AUTHORIZATION_CREDENTIAL The authorization credential in the request is invalid. For example, the OAuth 2.0 access token is not valid for the user's account.
EXPIRED_AUTHORIZATION_CREDENTIAL The OAuth 2.0 access token in the request is expired.

Last updated: Nov 04, 2020