Error Responses

Operations that fail return an HTTP status code (HTTP 1.1 Status Codes) indicating if there was a client error or server error. The body of the response contains a collection of API error items to provide additional information about the failure.

Parameters

  • errorType: Indicates the type of error. This is the primary identifier for the problem and can be used to map the type to a user readable string. For example, if your application receives an error with the errorType of invalidInput.fieldRequired, then you could display "This field is a required field; it cannot be left blank" to the user.
  • errorData: The name of the parameter that had the error.
  • errorMessage: Extra information about the error that is intended for the developer. This information is typically a sentence or other string. It is not localized, so it should not be shown to the user.
  • errorDetail: Some errors contain additional detail parameters that are included in the errorDetail parameter.
    • If the error type is invalidInput.outOfRange, then errorDetail includes the following parameters:
      • min: The minimum value allowed.
      • max: The maximum value allowed.
    • If you attempt to delete an item that is in use by other items, the errorType is referenceViolation.api and the errorDetail includes the following parameters:
      • referenceType: The type of item that references the item you tried to delete.
      • references: A collection of references, referencing the item you tried to delete, including the name and refURL of each referencing item.
      • totalCount: The total number of items referencing the item you attempted to delete.
      • totalShown: The total number of items included in the references collection.

Example Error Response

The following error is returned when attempting to create a call type with a negative value for the serviceLevelThreshold parameter:

Code Snippet
Copy<apiErrors>
    <apiError>
        <errorData>serviceLevelThreshold</errorData>
        <errorDetail>
            <min>1</min>
            <max>2147483647</max>
        </errorDetail>
        <errorMessage>This field must contain a value from 1 to 2147483647</errorMessage>
        <errorType>invalidInput.outOfRange</errorType>
    </apiError>
</apiErrors>