Alexa.Cooking.ErrorResponse Interface 3


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.

ErrorResponse 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. You can send the error response in a synchronous or asynchronous response. For more details, see Alexa.ErrorResponse.

ErrorResponse event format

Copied to clipboard.

{
"event": {
    "header": {
      "namespace": "Alexa.Cooking",
      "name": "ErrorResponse",
      "messageId": "Unique identifier, preferably a version 4 UUID",
      "payloadVersion": "3"
    },
    "endpoint": {
            "endpointId": "Endpoint id"
        },
    "payload": {
      "type": "Error type",
      "message": "Error message"
    }
  }
}

ErrorResponse event payload properties

Send an Alexa.ErrorResponse in an Event object. Include the following information in the event.payload parameter.

Field Description Type Required
type The type of error. Alexa shares this with the customer. String Yes
message The error message for the error. Alexa doesn't share this with the customer. String Yes

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. See example here.
DOOR_CLOSED_TOO_LONG The door hasn't 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 isn't 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.

In addition to the Alexa.Cooking error types, you can also use Alexa error types. For more details, see Alexa.ErrorResponse error type values.

Alexa.Cooking.ErrorResponse examples

The following examples show the payload for different error types.

DOOR_OPEN

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

Copied to clipboard.

{
  "event": {
    "header": {
      "namespace": "Alexa.Cooking",
      "name": "ErrorResponse",
      "messageId": "Unique identifier, preferably a version 4 UUID",
      "correlationToken": "Opaque correlation token that matches the request",
      "payloadVersion": "3"
    },
    "endpoint":{
      "endpointId": "Endpoint ID"
    },
    "payload": {
      "type": "DOOR_OPEN",
      "message": "The microwave door is open."
    }
  }
}

COOK_DURATION_TOO_LONG

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

Copied to clipboard.

{
  "event": {
    "header": {
      "namespace": "Alexa.Cooking",
      "name": "ErrorResponse",
      "messageId": "Unique identifier, preferably a version 4 UUID",
      "correlationToken": "Opaque correlation token that matches the request",
      "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"
    }
  }
}

Was this page helpful?

Last updated: Nov 22, 2023