Troubleshooting REST API Integrations

Troubleshooting REST API issues can sometimes be challenging, but a systematic approach can help you identify and resolve problems effectively. Below are some common errors and potential solutions.

“Bad Request” Error

An empty array, such as UDA, can trigger a Bad Request error. Additionally, comparing your formatting to the working cURL syntax examples provided by Chrome River can help you spot issues that would trigger this error.

If you haven’t received the example cURLs for the APIs you are working with, please contact your Implementation team member or create a case via our Help Desk Service Portal. You may also reference the Swagger pages accessible via the Implementation Toolkit for general information.

“401 Unauthorized” Error

This typically means you have not been given access to the specific API resource. It could also be that you are using an API key that does not match the environment it in which was issued. See API Key Management Admin Screen for details.

Data Integrity Issues

In Chrome River Expense, any entity relationship attributes on the Person or Allocation APIs require a valid entry in the Entity/EntityType API. If you receive one of the following errors, please check that the Entity you are sending is available in Chrome River.

POST / PATCH v4/persons 

  • 422 Unprocessable Entity (WebDAV) (RFC 4918)
{
   "code": "INVALIDINPUT",
   "message": "Invalid entityCode=001 and/or entityTypeCode=OFF"
}

v4/persons/batch

  • 207 Multi-Status (WebDAV) (RFC 4918)
  • 422 Unprocessable Entity (WebDAV) (RFC 4918)
{
   "personUniqueId": "USA00108",
   "result": "FAIL",
   "errorMessage": "Invalid entityCode=001 and/or entityTypeCode=OFF"
}

Case Sensitivity

Errors may result if the proper case has not been used for data in a field.

For example, if the Entity field is sent as rolename instead of roleName, you will see

  • 422 Unprocessable Entity (WebDAV) (RFC 4918)
{
   "code": "EMPTYFIELD",
   "message": "entityType, entity and role are all required for personEntities"
}

Was this article helpful?