Alexa.DataController.ErrorResponse Interface 1


If Alexa sends an Alexa.DataController directive to your skill and you can't handle it successfully, respond with an Alexa.DataController.ErrorResponse event. For details, see Alexa.DataController.

ErrorResponse event

In the payload for the Alexa.DataController.ErrorResponse, specify the type of the error and include a message with information about the error. For the list of Alexa.DataController error types, see Error type values. You can send the error response in a synchronous or asynchronous response. For more details, see Alexa.ErrorResponse.

ErrorResponse event payload properties

Property Description Type Required

type

Type of error. Alexa shares this with the customer.

String

Yes

message

Descriptive message for the error. Alexa doesn't share this with the customer.

String

Yes

ErrorResponse event format

Copied to clipboard.

{
"event": {
    "header": {
      "namespace": "Alexa.DataController",
      "name": "ErrorResponse",
      "messageId": "Unique identifier, preferably a version 4 UUID",
      "correlationToken": "correlation token received in the directive",
      "payloadVersion": "1.0"
    },
    "endpoint": {
      "scope": {
        "type": "BearerToken",
        "token": "OAuth2 bearer token"
      },
      "endpointId" :  "Endpoint ID" ,
    },
    "payload": {
      "type": "Error type",
      "message": "Error message"
    }
  }
}

Error type values

The following table shows the valid Alexa.DataController error types.

Property Description

DATA_DELETION_NOT_SUPPORTED

The device doesn't support data deletion.

DATA_RETRIEVAL_NOT_SUPPORTED

The device doesn't support data retrieval.

In addition to the Alexa.DataController.ErrorResponse error types, you can also use Alexa error types, such as INVALID_VALUE. For details, see Alexa.ErrorResponse error type values.

Alexa.DataController.ErrorResponse examples

The following examples show the payload for different error types.

DATA_DELETION_NOT_SUPPORTED

The following is an example error response for the DATA_DELETION_NOT_SUPPORTED error type.

Copied to clipboard.

{
  "event": {
    "header": {
      "namespace": "Alexa.DataController",
      "name": "ErrorResponse",
      "messageId": "Unique identifier, preferably a version 4 UUID",
      "correlationToken": "Opaque correlation token that matches the request",
      "payloadVersion": "1.0"
    },
    "endpoint":{
      "endpointId": "Endpoint id"
    },
    "payload": {
      "type": "DATA_DELETION_NOT_SUPPORTED",
      "message": "This endpoint does not support data deletion."
      }
  }
}

DATA_RETRIEVAL_NOT_SUPPORTED

The following is an example error response for the DATA_RETRIEVAL_NOT_SUPPORTED error type.

Copied to clipboard.

{
  "event": {
    "header": {
      "namespace": "Alexa.DataController",
      "name": "ErrorResponse",
      "messageId": "Unique identifier, preferably a version 4 UUID",
      "correlationToken": "Opaque correlation token that matches the request",
      "payloadVersion": "1.0"
    },
    "endpoint":{
      "scope":{
        "type": "BearerToken",
        "token": "OAuth2 bearer token"
      },
      "endpointId": "Endpoint id"
    },
    "payload": {
        "type": "DATA_RETRIEVAL_NOT_SUPPORTED",
        "message": "This endpoint does not support data retrieval by id."
    }
  }
}

Was this page helpful?

Last updated: Nov 22, 2023