Alexa Smart Home Error Response in the documentation is not clear enough

143 Views Asked by At

I am referring to the documentation of Amazon Alexa Smart Home and I have a doubt related to the JSON body they have given.

{"event": {
"header": {
  "namespace": "Alexa",
  "name": "ErrorResponse",
  "messageId": "abc-123-def-456",
  "correlationToken": "dFMb0z+PgpgdDmluhJ1LddFvSqZ/jCc8ptlAKulUj90jSqg==",
  "payloadVersion": "3"
},
"endpoint":{
    "endpointId":"appliance-001"
},
"payload": {
  "type": "ENDPOINT_UNREACHABLE",
  "message": "Unable to reach endpoint 12345 because it appears to be offline"
}}}

Is this the directive from the Alexa or is this the event I need to send in the response.

Thanks

1

There are 1 best solutions below

0
On BEST ANSWER

This is the ErrorResponse event that you have to send to Alexa whenever an error occurs while processing a control or query directive.

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

  1. type: This indicates the kind of error that has occurred. Alexa uses this attribute to respond to the customer appropriately.
  2. message: String that provides more information about the error for logging purposes.

ENDPOINT_UNREACHABLE error type indicates that the target endpoint is currently unreachable or offline.