---
updatedAt: 2026-09-01T09:20:24.000Z
agentTools:
  projectIndex: https://rivhit-api.readme.io/llms.txt
---

# 🛑 Error Codes

This page provides a reference for common error responses returned by the API, including example responses, explanations, error categories, and troubleshooting guidance.

## How Error Responses Work

The API uses two layers of error reporting:

### 1. HTTP Status Code

Indicates the general type of error (e.g., `400`, `401`, `500`).

### 2. API Error Body (JSON or HTML)

Provides detailed information about what went wrong, including:

* `error_code`
* `client_message` (usually Hebrew, user-friendly)
* `debug_message` (internal English identifier)
* `data` (optional extra context)

# System Error Responses

Below are sample responses for the most common status codes.

## Bad Request (400)

<br />

A `400 Bad Request` occurs when the server cannot parse or validate the incoming request.

### Example Response (HTML)

*Returned mostly from SOAP/WCF-style endpoints*

```html
<html>
  <head>
    <title>Request Error</title>
  </head>
  <body>
    <h1>Request Error</h1>
    <p>The server encountered an error processing the request. Please see the
       <a href="https://icredit.rivhit.co.il/API/PaymentPageRequest.svc/help">
       service help page</a> for constructing valid requests to the service.
    </p>
  </body>
</html>
```

### Common Causes

* Invalid JSON/XML (malformed body)
* Missing required fields
* Incorrect Content-Type header
* Sending JSON to a SOAP endpoint (or vice-versa)
* Field types do not match the schema

***

## Internal Server Error (500)

<br />

A `500` indicates that the request reached the server, but an unexpected error prevented processing.

### Example Response (JSON)

```json
{
    "error_code": -94,
    "client_message": "הסכום אינו תקין",
    "debug_message": "-94 : INVALID_AMOUNT",
    "data": null
}
```

### Field Descriptions

| Field            | Type    | Description                                             |
| :--------------- | :------ | :------------------------------------------------------ |
| `error_code`     | Integer | The unique numeric identifier for the error.            |
| `client_message` | String  | A message intended for display to the user or client.   |
| `debug_message`  | String  | A message providing the internal, English-language code |
| `data`           | String  | Additional error context.                               |

<br />

***

## Size Error (413)

<br />

The `413 Request Entity Too Large` error occurs when the request payload exceeds the server's maximum allowed size. For this API, the limit is strictly set to **65,536 bytes (64 KB)**.

<Callout icon="📣" theme="warn">
  ### This most commonly happens when a single document contains a very high number of items (rows) or extremely long text descriptions.


</Callout>

###