Skip to main content

Overview

When a request to the Payroll Integrations API fails, the response will include an error object with details about what went wrong. All error responses follow a consistent structure to make error handling straightforward and predictable.

Error Object Structure

Error responses contain the following fields:
string
required
A human-readable error message describing what went wrong. This provides a high-level summary of the error.
array
An optional array of detailed error messages. When present, this provides additional context or lists multiple validation errors that occurred.

Example Error Response

Here’s an example of a typical error response:

Common HTTP Status Codes

The API uses standard HTTP status codes to indicate the type of error:
Important: Error messages are not guaranteed to remain consistent between API versions.Do not write code that depends on exact error message text, as these messages may change without notice to improve clarity or provide better context. Instead, rely on HTTP status codes and structure your error handling logic accordingly.