Error Response

Important Notes

When the API operation fails, a detailed error is returned in the HTTP response body.

The ErrorDetail element in the XML response carries multiple data elements for the error. This new element is added based on the Cisco Packaged Contact Center Enterprise (PCCE) conventions. This element carries the information relevant to the error, which can be used in localized messages.


<APIErrors>
   <APIError>
      <ErrorType>Type of Error</ErrorType>
      <ErrorData>Field Error Occurred</ErrorData>
      <ErrorMessage>A Description of the Error</ErrorMessage>
      <ErrorDetail>Extra information about the Error</ErrorDetail>
   </APIError>
</APIErrors>

An example of the ErrorDetail field for an error type, such as invalidInput.outOfRange, is as follows:


<ErrorDetail>
   <min>0</min>
   <max>5</max>
</ErrorDetail>

The following list contains important notes about the API error response:

  • One or more errors can be returned within the <APIErrors> tag.

  • Each individual error is enclosed in its own <APIError> body.

  • <ErrorType> is always returned. Valid types are defined in com.cisco.ccbu.ccp.API.CcpAPIErrorType.

  • <ErrorDetail> may be returned depending on the <ErrorType>.

  • <ErrorMessage> is purely optional. It may be used to provide additional information to the developer.

  • Internationalization is the responsibility of the client. Localization of errors is based on <ErrorType> and <ErrorData>.