Alexa.SmartVision.ObjectDetectionSensor.ErrorResponse Interface 1.0
If Alexa sends an Alexa.SmartVision.ObjectDetectionSensor
directive to your skill and you can't handle it successfully, respond with an Alexa.SmartVision.ObjectDetectionSensor.ErrorResponse
event. For details, see Alexa.SmartVision.ObjectDetectionSensor
.
Alexa.ErrorResponse
and this interface might have different payload versions. Make sure to use the payload version of the interface that you respond with.ErrorResponse event
In the payload for the Alexa.SmartVision.ObjectDetectionSensor.ErrorResponse
, specify the type of the error and include a message with information about the error. For the list of Alexa.SmartVision.ObjectDetectionSensor
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 of error. Alexa shares this with the customer. |
String |
Yes |
|
Descriptive message for the error. Alexa doesn't share this with the customer. |
String |
Yes |
ErrorResponse event format
{
"event": {
"header": {
"namespace": "Alexa.SmartVision.ObjectDetectionSensor",
"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": "Error type",
"message": "Error message"
}
}
}
Error type values
The following table shows the valid Alexa.SmartVision.ObjectDetectionSensor
error types.
Property | Description |
---|---|
|
The requested object class wasn't enabled because a subscription is required. If the error was due to an invalid object class, in the payload, include the following parameters:
|
|
The requested object class wasn't enabled due to an invalid object class, in the payload, include the following parameters:
|
In addition to the Alexa.SmartVision.ObjectDetectionSensor.ErrorResponse
error types, you can also use Alexa error types, such as INVALID_VALUE
and include the errorClasses
and final list of enabled objectDetectionClasses
in the payload. For details about other error types, see Alexa.ErrorResponse
error type values.
Alexa.SmartVision.ObjectDetectionSensor.ErrorResponse examples
The following examples show the payload for different error types.
SUBSCRIPTION_REQUIRED
The following is an example error response for the SUBSCRIPTION_REQUIRED
error type. Include the errorClasses
and objectDetectionClasses
in the payload. These properties are arrays of ClassConfiguration
objects.
{
"event": {
"header": {
"namespace": "Alexa.SmartVision.ObjectDetectionSensor",
"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": "SUBSCRIPTION_REQUIRED",
"message": "The classes could not be enabled because a subscription is required.",
"errorClasses": [{
"imageNetClass": "cat"
}],
"objectDetectionClasses": [{
"imageNetClass": "person"
}]
}
}
}
INVALID_VALUE
The following is an example error response for the INVALID_VALUE
error type. Include the errorClasses
and objectDetectionClasses
in the payload.
{
"event": {
"header": {
"namespace": "Alexa.SmartVision.ObjectDetectionSensor",
"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": "INVALID_VALUE",
"message": "Invalid parameter value.",
"errorClasses": [{
"imageNetClass": "xxxxx"
}],
"objectDetectionClasses": [{
"imageNetClass": "person"
}]
}
}
}
Related topics
Last updated: Nov 22, 2023