Exceptions

Requests that result in errors return exceptions. For more information, refer to the following sections:

Exception Details

The following table lists the exception details fields:
Topic Description
type Error type
title Summary title for error
status HTTP response code:
  • 4xx: client-side error
  • 5xx server error
detail Detailed error message
instance URI that provides more details
error code Error code with the format OSC-CREST-#####, where ##### is a 5-digit number. For more information, see Error Codes.
The following is an example of an exception:
{
"type": "https://mysite.example.com/services/rest/connect/exceptions/OSC-CREST-00006",
"title": "An attempt to write a resource failed",
"status": 400,
"detail": "A problem setting a property to reference another object was encountered:
Invalid ID: No such Contact with ID = 209",
"instance": "https://mysite.example.com/services/rest/connect/v1.4/incidents",
"o:errorCode": "OSC-CREST-00006"
}

Retrieving the List of Exceptions

Use the GET method with the following URI to view the list of exceptions:
https://your_site_interface/services/rest/connect/exceptions
This request returns, for example:

{
    "items": [
    {
        "rel": "canonical",
        "href": "https://mysite.example.com/services/rest/connect/exceptions/OSC-CREST-00000"
        },
    {
        "rel": "canonical",
        "href": "https://mysite.example.com/services/rest/connect/exceptions/OSC-CREST-00001"
        },
        ...
    {
        "rel": "canonical",
        "href": "https://mysite.example.com/services/rest/connect/exceptions/OSC-CREST-00033"
        }
    ]
}

Retrieving Individual Exceptions

Use the GET method with the following URI to view an exception:
https://your_site_interface/services/rest/connect/exceptions/exception_num
For example:
https://mysite.example.com/services/rest/connect/exceptions/OSC-CREST-00001
Returns the metadata for exception OSC-CREST-00001:

{
    "type": "https://mysite.example.com/services/rest/connect/exceptions/OSC-CREST-00001",
    "title": "An unrecognized exception code was used",
    "status": 200,
    "detail": "Exceptions have the format of OSC-CREST-#####
    where ##### is replaced with a 5-digit numeric value. The numeric value
    passed in does not correspond to any known exception at this time.
    Future exceptions may be added which might use this code.",
    "instance": "https://mysite.example.com/services/rest/connect/exceptions/OSC-CREST-00001",
    "o:errorCode": "OSC-CREST-00001"
}