Thank you for your visit. This page is only available in English at this time.

Alexa.Cooking.ErrorResponse Interface

If Alexa sends an Alexa.Cooking directive to your skill and you can't handle it successfully, respond with an Alexa.Cooking.ErrorResponse event. For an overview of the Alexa.Cooking interfaces, see Build Smart Home Skills for Cooking Appliances.

Error response event

In the payload for the Alexa.Cooking.ErrorResponse, specify the type of the error and include a message with information about the error. For the list of Alexa.Cooking error types, see Error type values.

ErrorResponse event payload details

Field Description Type Required
type The type of error. String Yes
message The error message for the error. String Yes

ErrorResponse event format

{
"event": {
    "header": {
      "namespace": "Alexa.Cooking",
      "name": "ErrorResponse",
      "messageId": "<message id>",
      "payloadVersion": "3"
    },
    "payload": {
      "type": "<error type>",
      "message": "<error message>"
    }
  }
}

Error type values

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

Error Type Description
CHILD_LOCK The child lock on the appliance is enabled.
COOK_DURATION_TOO_LONG The requested duration is too long for the appliance to run safely. When you send this error response, include a field in the payload named maxCookTime that indicates the maximum cook time allowed for the current cooking parameters.
DOOR_CLOSED_TOO_LONG The door has not been opened and closed recently and the appliance is likely empty. For example, an attempt to start cooking when no food is present.
DOOR_OPEN The appliance door is open. For example, an attempt to start cooking while the door is open.
PREHEAT_REQUIRED The appliance must be preheated.
PROBE_REQUIRED The temperature probe must be inserted.
REMOTE_START_NOT_SUPPORTED Cooking remotely is not currently supported by the device.
REMOVE_PROBE The temperature probe must be removed.
REMOTE_START_DISABLED Cooking remotely was disabled and must be re-enabled before cooking.

Examples

Synchronous error response example

{
  "event": {
    "header": {
      "namespace": "Alexa.Cooking",
      "name": "ErrorResponse",
      "messageId": "<message id>",
      "payloadVersion": "3"
    },
    "endpoint":{
      "endpointId": "<endpoint id>"
    },
    "payload": {
      "type": "COOK_DURATION_TOO_LONG",
      "message": "Cook time must not exceed 2 hours for the current settings.",
      "maxCookTime": "PT2H"
    }
  }
}

Asynchronous error response example

If you respond asynchronously, include a correlation token and a scope with an authorization token.

{
  "event": {
    "header": {
      "namespace": "Alexa.Cooking",
      "name": "ErrorResponse",
      "messageId": "<message id>",
      "correlationToken": "<an opaque correlation token>",
      "payloadVersion": "3"
    },
    "endpoint":{
      "scope":{
        "type":"BearerToken",
        "token":"access-token-from-Amazon"
      },
      "endpointId": "<endpoint id>"
    },
    "payload": {
      "type": "DOOR_OPEN",
      "message": "The microwave door is open."
    }
  }
}