Alexa.SmartVision.SnapshotProvider.ErrorResponse Interface 1.1


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

ErrorResponse event

In the payload for the Alexa.SmartVision.SnapshotProvider.ErrorResponse, specify the type of the error and include a message with information about the error. For the list of Alexa.SmartVision.SnapshotProvider error types, see Error type values. You can send the error response in a synchronous or asynchronous response. If you respond asynchronously, include a correlation token and a scope with an authorization token. For more details about error reporting, 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.SmartVision.SnapshotProvider",
      "name": "ErrorResponse",
      "messageId": "Unique identifier, preferably a version 4 UUID",
      "correlationToken": "Opaque correlation token that matches the request",
      "payloadVersion": "1.1"
    },
    "endpoint":{
      "endpointId": "Endpoint ID"
    },
    "payload": {
      "type": "Error type",
      "message": "Error message"
    }
  }
}

Error type values

The following table shows the valid Alexa.SmartVision.SnapshotProvider error types.

Property Description

SUBSCRIPTION_REQUIRED

Endpoint can't provide a snapshot because a subscription is required.

DISABLED_BY_USER

Endpoint can't provide a snapshot because the customer disabled the snapshot feature in the camera app.

In addition to the Alexa.SmartVision.SnapshotProvider.ErrorResponse error types, you can also respond with a generic Alexa.ErrorResponse event if your error isn't specific to the snapshot capability.

Alexa.SmartVision.SnapshotProvider.ErrorResponse example

The following examples show the payload for an example error type.

SUBSCRIPTION_REQUIRED

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

Copied to clipboard.

{
    "event": {
        "header": {
            "namespace": "Alexa.SmartVision.SnapshotProvider",
            "name": "ErrorResponse",
            "messageId": "Unique identifier, preferably a version 4 UUID",
            "correlationToken": "Opaque correlation token that matches the request",
            "payloadVersion": "1.1"
        },
        "endpoint": {
            "scope": {
                "type": "BearerToken",
                "token": "access-token-from-Amazon"
            },
            "endpointId": "Endpoint Id"
        },
        "payload": {
            "type": "SUBSCRIPTION_REQUIRED",
            "message": "Snapshot feature cannot be enabled because a subscription is required"
        }
    }
}

Was this page helpful?

Last updated: frontmatter-missing