Skip to main content
🤖 This page lists the errors the Judit API returns on calls: the HTTP error (4xx), with the specific code in error.data, and the application_error that arrives as a query result. All examples are real API responses.

Anatomy of an error

The Judit API distinguishes two kinds of error:

HTTP error (4xx)

The call was rejected: authentication, permission, missing resource or validation. The body has the format { "error": { "name", "message", "data" } }, and the specific code is in error.data.

Application error (application_error)

The call was accepted, but the query did not return the expected object (for example, lawsuit not found). It arrives as an item with response_type: "application_error".

HTTP error format

Every HTTP error has the same envelope:
For automation, switch on error.data. error.name and error.message only tell you the category.

HTTP codes

A route that does not exist (mistyped URL) returns 404 with a plain-text body (Content-Type: text/plain): Not Found. It is not JSON, so handle this case before parsing the body.

Codes in error.data

Authentication (401)

Permission (403)

Resource not found (404)

Validation (400)

On 400, error.data is a list. Each item follows the pattern "<field> <message>", and the list includes all rules violated in the same call.
Messages returned by the API:
On GET /responses, a request_id that does not exist returns 400 (REQUEST_NOT_FOUND inside the list), not 404. GET /requests/{request_id} returns 404 for the same case.

Application errors (application_error)

When the query is accepted but does not find what was requested, the result arrives as an item with response_type: "application_error" in the request’s responses (GET /responses), which are also delivered to the webhook. response_data has a numeric code and a message with the error name:
application_info notices (request completed, code: 600, and tracking paused, code: 700 to 703) are not errors. See Events delivered.

Centralized handler (ready-to-use code)

Create a single interceptor to log and handle Judit API errors.

Handling patterns

error.name only tells you the category (HttpNotFoundError, for example). What distinguishes a TRACKING_NOT_FOUND from a REQUEST_NOT_FOUND is error.data.
The 400 error.data includes every violated rule at once. Show the whole list so everything can be fixed in a single attempt.
For application_error, use response_data.message (e.g. LAWSUIT_NOT_FOUND) to decide how to handle it.
Treat application_error as a valid result of the query (the integration is OK), while HTTP 4xx means the call is wrong. Log them separately in your monitoring.
The webhook redelivers on failure. Always check callback_id before processing — store it in a table (id, received_at). If it already exists, ignore it.

Quick troubleshooting table

Next steps