When a call fails, Davix H2I answers with an HTTP status and a JSON body that says what went wrong and what to do.
The shape of an error
{
"status": "error",
"code": "invalid_api_key",
"message": "Your API key is missing or invalid.",
"error": { "code": "invalid_api_key", "message": "...", "hint": "..." },
"request_id": "..."
}
code is stable: build your logic on it, not on the message. hint says what to try. Keep the request_id (also in the Request-Id response header) when you contact support.
Retry or not
Each code is marked retryable or not. Retry only retryable errors, such as rate_limit_exceeded (429), server_busy (503), timeout (503) and rate_limit_unavailable (503), and wait a little longer after each try. Do not retry errors that say your request is wrong. The official SDKs do this for you and only retry safe calls or calls that carry an idempotency key.
The most common codes
| Code | HTTP | What it means |
|---|---|---|
invalid_api_key |
401 | Key missing or invalid |
key_expired |
401 | Key expired |
invalid_parameter |
400 | A setting is invalid; the message names it |
missing_field |
400 | A required field or file is missing |
unsupported_media_type |
415 | That file type is not accepted |
invalid_upload |
400 | The file could not be read |
file_too_large |
413 | The file is over the size limit |
too_many_files |
413 | More files than allowed in one request |
pdf_page_limit_exceeded |
413 | The PDF has more pages than allowed |
endpoint_not_allowed |
403 | Your plan does not include this tool |
format_not_allowed |
403 | Your plan does not include this format |
monthly_quota_exceeded |
429 | Allowance used up |
rate_limit_exceeded |
429 | Too many requests |
url_blocked / url_fetch_failed |
400 | The address is not allowed, or could not be downloaded |
async_requires_customer_key |
400 | Background jobs need a personal key |
idempotency_key_conflict |
409 | Same Idempotency-Key, different request |
image_processing_failed, pdf_tool_failed, data_conversion_failed, html_render_failed |
500 | The file could not be processed; try another file or setting |
internal_error |
500, 503 | Something went wrong on our side |
The full list
The API has 93 error codes. Read them all, with HTTP status and whether they are retryable, at GET /v1/contract/errors, or the errors of one endpoint at /v1/contract/endpoints/{id}/errors. Each tool’s page in the API reference lists the errors it can return.
Stuck? See Fix: a tool run returns an error.
Checked against API contract 3.0.0.
