---
title: "Errors | Developer guide | R&D Copilot"
lang: en
canonical: https://rdcopilot.com/docs/errors/
content_version: 56a3c9beaf4f126fa30029d51876885d58f60c559c4dee991d984d3bea04684a
contact: https://rdcopilot.com/contact/
---

# Errors

The error object, the shared codes with what to do for each, and what to send us when you ask for help.

An error is an HTTP status and a JSON object whose `code` never changes its meaning.

## The error object

| Field | Meaning |
| --- | --- |
| `code` | A stable code for the cause. Act on `code`. |
| `message` | A sentence to read in your logs. It can change, so do not show it to the people who use your software and do not match on it. |
| `fields` | On a 400, each field that is wrong and why. Absent otherwise. |
| `requestId` | The identifier of this request. Quote it when you ask us for help. |

Every answer, an error or not, also carries the header `X-RDC-Request-Id` with the same value.

## The shared codes

Every product answers these. The last column says whether to send the request again.

| Status | Code | Meaning | Retry |
| --- | --- | --- | --- |
| `400` | `invalid_request` | The request cannot be read or breaks the contract: malformed JSON, a missing or unknown field, a wrong type. `fields` names each one. | No. Fix the request. |
| `401` | `unauthorized` | The token is missing, expired or not ours. | After you get a new token. |
| `403` | `forbidden` | The token does not give access to this company or operation. | No. |
| `404` | `<thing>_not_found` | The record does not exist for this company. | No. |
| `409` | `revision_conflict` | `expectedRevision` is older than the record. | Read the record again, then send a new operation. |
| `409` | `operation_reused` | This `operationId` was sent before with another body. | No. |
| `422` | A code of the product, such as `blocked_by_checks` | The request is well formed and a rule of the product refuses it. | No. The code says what to change. |
| `429` | `rate_limited` | Too many requests. `Retry-After` gives the seconds. | Yes, after the pause. |
| `503` | `unavailable` | The service cannot answer now. | Yes, with the same `operationId`. |

## Codes of a product

A product adds codes for its own rules, always at 422 or as `<thing>_not_found` at 404. They are listed on the Errors page of the product docs, after the shared table. A product never renames a shared code or gives it another meaning.

## A validation answer

A request that cannot be read or breaks the contract answers 400. `fields` names each field that is wrong, so one answer lists every problem.

Answer 400 invalid\_request

```json
{
  "code": "invalid_request",
  "message": "The request breaks the contract.",
  "fields": [
    {
      "field": "lines[0].quantity",
      "problem": "must be a decimal string such as \"24\""
    },
    {
      "field": "occurredAt",
      "problem": "is required"
    }
  ],
  "requestId": "req_8Kq2mT4vXz9N"
}
```

-   `code` is `invalid_request`: fix the request. Sending it again unchanged gives the same answer.
-   `fields[].field` is the path of the field, and `problem` says what is wrong with it.
-   `requestId` is the identifier to send us.

## A conflict answer

When the record has changed since you read it, the change is answered with 409 `revision_conflict`. Nothing was applied.

Answer 409 revision\_conflict

```json
{
  "code": "revision_conflict",
  "message": "The balance changed after revision 6.",
  "requestId": "req_3Hd7vB1pLw5R"
}
```

-   Read the record again: its `revision` is now newer than the one you sent.
-   Decide whether your change still applies, then send it as a new operation, with a new `operationId`.

## What to send us when you ask for help

-   The `requestId` of the answer.
-   The `operationId` of the change, if there was one.
-   The time, with the time zone.

Do not include a token, a secret or the body of a record in the message.

## In the product docs

-   [ERP: Error codes of the product](https://erp.rdcopilot.com/docs/reference/errors/#product-codes)
-   [Inventory: Error codes of the product](https://inventory.rdcopilot.com/docs/reference/errors/#product-codes)
-   [WMS: Error codes of the product](https://warehouse.rdcopilot.com/docs/reference/errors/#product-codes)
-   [POS: Error codes of the product](https://pos.rdcopilot.com/docs/reference/errors/#product-codes)
-   [Self-Checkout: Error codes of the product](https://checkout.rdcopilot.com/docs/reference/errors/#product-codes)
-   [Accounting: Error codes of the product](https://accounting.rdcopilot.com/docs/reference/errors/#product-codes)
-   [Treasury: Error codes of the product](https://banking.rdcopilot.com/docs/reference/errors/#product-codes)
-   [HR: Error codes of the product](https://hr.rdcopilot.com/docs/reference/errors/#product-codes)
-   [Payroll: Error codes of the product](https://payroll.rdcopilot.com/docs/reference/errors/#product-codes)
-   [eLearning: Error codes of the product](https://elearning.rdcopilot.com/docs/reference/errors/#product-codes)
-   [CRM: Error codes of the product](https://crm.rdcopilot.com/docs/reference/errors/#product-codes)
-   [AI Assistant: Error codes of the product](https://ai.rdcopilot.com/docs/reference/errors/#product-codes)
-   [Private AI Workspace: Error codes of the product](https://private-ai.rdcopilot.com/docs/reference/errors/#product-codes)
-   [DMS: Error codes of the product](https://documents.rdcopilot.com/docs/reference/errors/#product-codes)
-   [BI: Error codes of the product](https://reports.rdcopilot.com/docs/reference/errors/#product-codes)
-   [IoT: Error codes of the product](https://iot.rdcopilot.com/docs/reference/errors/#product-codes)
-   [e-Factura Gateway: Error codes of the product](https://efactura.rdcopilot.com/docs/reference/errors/#product-codes)
-   [e-TVA Check: Error codes of the product](https://etva.rdcopilot.com/docs/reference/errors/#product-codes)
-   [e-Transport Gateway: Error codes of the product](https://etransport.rdcopilot.com/docs/reference/errors/#product-codes)
-   [Tax Filing: Error codes of the product](https://declarations.rdcopilot.com/docs/reference/errors/#product-codes)
-   [REGES Gateway: Error codes of the product](https://reges.rdcopilot.com/docs/reference/errors/#product-codes)
-   [Integrations: Error codes of the product](https://integrations.rdcopilot.com/docs/reference/errors/#product-codes)

## Related pages

-   [Idempotency and retries](https://rdcopilot.com/docs/idempotency/): when to send a request again.
-   [Limits](https://rdcopilot.com/docs/limits/): the 429 answer.

[Previous · **Requests and responses**](https://rdcopilot.com/docs/requests/) [Next · **Idempotency and retries**](https://rdcopilot.com/docs/idempotency/)

---

R&D Copilot · Made in EU · Contact: https://rdcopilot.com/contact/
