🤖 This page lists the errors the Judit API returns on calls: the HTTP error (4xx), with the specific code inerror.data, and theapplication_errorthat 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: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.
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
Switch on error.data, not error.name
Switch on error.data, not error.name
error.name only tells you the category (HttpNotFoundError, for example). What distinguishes a TRACKING_NOT_FOUND from a REQUEST_NOT_FOUND is error.data.On 400, show every violation
On 400, show every violation
The
400 error.data includes every violated rule at once. Show the whole list so everything can be fixed in a single attempt.Switch on the application_error message
Switch on the application_error message
For
application_error, use response_data.message (e.g. LAWSUIT_NOT_FOUND) to decide how to handle it.application_error vs HTTP 4xx
application_error vs HTTP 4xx
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.Idempotency via callback_id
Idempotency via callback_id
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
- 👉 Authentication — how to send the
api-keycorrectly to avoid401. - 👉 Pagination — the
pageandpage_sizeparameters. - 👉 Webhook & Callbacks — events, redeliveries and idempotency.
- 👉 Glossary — referenced technical terms.