Errors are datatypes containing information about occurred failures which were either cause by the user or appeared in the server.
Error model specification
Error codes
A Ditto error defines an “error code” which is a string identifier that uniquely identifies the error.
Ditto itself uses the following prefixes for its error codes:
things:
- for errors related to thingspolicies:
- for errors related to policiesthings-search:
- for errors related to the things searchacknowledgement:
- for errors related to acknowledgementsmessages:
- for errors related to messagesplaceholder:
- for errors related to placeholdersjwt:
- for errors related to JWT based authenticationgateway:
- for errors produced by the (HTTP/WS) gateway serviceconnectivity:
- for errors produced by the connectivity service
Examples
{
"status": 404,
"error": "things:attribute.notfound",
"message": "The attribute with key 'unknown-key' on the thing with ID 'org.eclipse.ditto:my-thing' could not be found or the requester had insufficient permissions to access it.",
"description": "Check if the ID of the thing and the key of your requested attribute was correct and you have sufficient permissions."
}
{
"status": 400,
"error": "messages:id.invalid",
"message": "Thing ID 'foobar2000' is not valid!",
"description": "It must conform to the namespaced entity ID notation (see Ditto documentation)",
"href": "https://www.eclipse.org/ditto/basic-namespaces-and-names.html#namespaced-id"
}