Errors

Error Messages

In most cases, if the REST API returns an error (that is, an HTTP 4xx or 5xx) then it will also return detailed information about the error in the response’s message body. This message will be encoded as a JSON document with the following properties:

code
A string identifier for the error.
subcode
A string identifier for a subcode that may be associated with the error code.
message
A user-friendly, human-readable error message.

For example, if a GET request is performed against a URL that is not associated with an object in the StateServer service, the response will return an HTTP 404 (Not Found) status code, and the message body will contain the following JSON document:

{
  "code":"ObjNotFound",
  "subcode":"",
  "message":"Object not found."
}