Error Messages

When an error occurs in the REST API for Sites Management, the response status code is 4XX or 5XX. The body of the response will contain an error message as an Error Detail object. The following table describes the attributes of the object:

Attribute Description
type This attribute will contain an absolute URI that identifies the problem type. When this URI dereferenced, it should provide a human-readable summary of the problem, for example, as a HTML page.

This is a required field and will always be present.

title Short, human-readable summary of the problem. It is not advisable to use the title as a way of checking for specific errors, use the o:errorCode, if present, for this purpose.

Some examples include:

  • Site Not Found
  • Invalid Site Name
  • Site Already Exists

This is a required field and will always be present.

status A number attribute that is the corresponding HTTP status code for the error.
detail Description specific to this occurrence of the problem. The human-readable, potentially multi-line, description the problem in more details.
instance URI to the link that provides more detail about the error.
o:errorCode Application error code, which is different from HTTP error code. This code should be used to check for specific errors, rather than comparing fields such as the title or detail.
o:errorPath XPath or JSON path to indicate where the error occurs.
o:errorDetails This attribute contains an array of other Error Detail objects. These are generally auxiliary in nature or show the root cause of the top-level error.