🛑 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)


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>
  <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)


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

Example Response (JSON)

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

Field Descriptions

FieldTypeDescription
error_codeIntegerThe unique numeric identifier for the error.
client_messageStringA message intended for display to the user or client.
debug_messageStringA message providing the internal, English-language code
dataStringAdditional error context.


Size Error (413)


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).

📣

This most commonly happens when a single document contains a very high number of items (rows) or extremely long text descriptions.


Did this page help you?