Dimension Service API  2.0.0
api index

Error Object

since: 0.6
This object is returned from resources in anticipated and known error conditions within the service and provides details to the client so that it can, in some situations, attempt to recover from the request failure. For example, a client could prompt for a missing value in a required field.

Not all error conditions that return this object type are correctable by the client, and there may be error conditions at the transport or protocol layer that do not result in this object type. For instance, a PUT request on a resource that does not support that HTTP method may generate 405 METHOD NOT ALLOWED with an empty response body or a body containing some other type (e.g. HTML).

Fields

requestID
0.6required
string
A relatively unique identifier for the failed request. This value can be provided to the service's technical support staff to help locate server-side log messages related specifically to the failed request.
errorID
0.6required
string
A well-known, documented identifier for this error condition. Clients that wish to handle or display certain errors should use this field to identify the supported error conditions. Clients must not rely on matching or parsing the errorMessage, which could change without notice at any time.
errorMessage
0.6required
string
The localized error message. Clients may display this field to the user as a last resort, but for an optimal end-user experience a client should instead detect the errorID and take action specific to the client's user interface. This field is primarily intended for developers or for command-line type clients that have minimal interfaces or no error handling capabilities.

The content of this message may vary depending on the language and locale of the user. The text is subject to change without notice, so clients must not attempt to parse the message or extract specific substrings.

resourceType
0.6optional
string
A well-known, documented identifier specific to the resource (or type of data) that caused or was affected by this error. Clients may use this field to enhance their error-handling capabilities, since in some complex operations the cause of an error may not be directly related to the resource invoked by the client.
resourceID
0.6optional
string
The ID of the object that caused this error. This ID is valid within the resource type indicated by the resourceType field, not necessarily the resource that the client was accessing when it received this error. Clients that handle the resourceType field may also use this field to enhance their error-handling capabilities.

If this field is present, then the resourceType field is required.

details
0.6optional
array of ErrorDetail
Collection of zero or more details that provide supplemental information about this error. For example, if multiple fields failed validation there may be a detail entry for each invalid field.

Related API Resources

Example - minimal form

{
  "requestID"   : "sdfFDSJKf42hu942h",
  "errorID"     : "EXAMPLE-012345",
  "errorMessage": "Lo sentimos si esto es una traducción de mala calidad."
}
  

Example - with resource identifier

{
  "requestID"   : "sdfFDSJKf42hu942h",
  "errorID"     : "EXAMPLE-012345",
  "errorMessage": "Lo sentimos si esto es una traducción de mala calidad.",
  "resourceType": "some-identifier",
  "resourceID"  : "type-specific-ID-c689acc7-ee13-3482-aa7b-c6a13419431c"
}
  

Example - with details

{
  "requestID"   : "sdfFDSJKf42hu942h",
  "errorID"     : "EXAMPLE-123456",
  "errorMessage": "Could not create a new Foo, one or more field values needs attention.",
  "resourceType": "some-identifier",
  "resourceID"  : "type-specific-ID-c689acc7-ee13-3482-aa7b-c6a13419431c",
  "details"     : [
    {
      "fieldID":      "name",
      "errorID":      "EXAMPLE-000001",
      "errorMessage": "Must not be blank."
    },
    {
      "fieldID":      "email",
      "errorID":      "EXAMPLE-000002",
      "errorMessage": "Does not appear to be a valid e-mail address."
    }
  ]
}