Error codes
Every error has the same shape and a code that never changes, so your code can handle errors in one place.
On this page
Errors are problem details (RFC 9457), sent with Content-Type: application/problem+json:
{
"code": "settings_invalid",
"detail": "These settings don't match the operation's settings schema.",
"request_id": "cd2be7ba329844a0d3057b3b9954ae43",
"status": 422,
"title": "Unprocessable Entity",
"type": "about:blank"
}| Field | Meaning |
|---|---|
code | What went wrong, as a code that never changes. Act on this. |
detail | A sentence for people, in English. It may change. |
status | The HTTP status. |
title | The HTTP status’s name. |
type | Always about:blank. |
request_id | Quote it if you contact us about this request. |
Some codes add fields of their own, such as files, inputs or shortfall. The table below names them.
| Status | Meaning |
|---|---|
| 200, 201, 202, 204 | It worked. |
| 400 | The request is wrong: fix it before trying again. |
| 401 | The API key is missing, unknown or revoked. |
| 402 | The Workspace needs a subscription or more credits. |
| 403 | This caller may not make this change. |
| 404 | There’s no such thing in this Workspace. |
| 405 | The address doesn’t accept this method. |
| 409 | It clashes with the current state, such as a job still running. |
| 410 | Storage no longer has an upload’s parts. |
| 413, 415 | A file is too large, or of a type the operation doesn’t take. |
| 422 | The request is well formed but can’t be done as asked. |
| 429 | Too many calls, or too many jobs at once: wait, then try again. |
| 500, 503 | A problem on our side: try again in a few minutes. |
| Code | Status | Meaning and what to do |
|---|---|---|
bad_request | 400 | The body isn’t valid JSON for this endpoint, has a field it doesn’t take, or a value is out of range. Fix the request. |
unknown_operation | 400 | No operation has this ID. GET /v1/operations lists them. |
unauthorized | 401 | The API key is missing, unknown or revoked. Check the Authorization header. |
insufficient_credits | 402 | Not enough credits for the job’s reservation. required_credits, available_credits and shortfall give the numbers. |
subscription_required | 402 | The Workspace has no active subscription. Choose one of the plans. |
forbidden | 403 | This caller may not make this change. |
not_cancellable | 403 | Only whoever started the job can cancel it. Any of the Workspace’s API keys can cancel a job started with one, so a key doesn’t get this code. |
not_deletable | 403 | Only whoever started the job can delete its files. Any of the Workspace’s API keys can delete the files of a job started with one, so a key doesn’t get this code. |
not_found | 404 | There’s no such operation, upload, file, job or webhook endpoint in this Workspace. |
method_not_allowed | 405 | The address doesn’t accept this method. The Allow header lists the ones it does. |
already_uploaded | 409 | The upload is already complete. |
files_unusable | 409 | An operation that makes one result from all its files can’t use one of them. inputs gives each one’s reason. |
idempotency_key_in_use | 409 | A request with this Idempotency-Key is still running. Wait a moment, then retry. |
still_running | 409 | A running job’s files can’t be deleted. Cancel the job first. |
too_many_webhooks | 409 | The Workspace already has 20 webhook endpoints. Remove one first. |
upload_incomplete | 409 | Parts are missing or have the wrong length. Send those in missing_parts and wrong_parts, then complete the upload again. |
upload_gone | 410 | Storage no longer has the upload’s parts, so it can’t be completed. Start it again. |
file_too_large | 413 | A file is larger than the operation takes. files names it, with limit_bytes. |
unsupported_type | 415 | The operation doesn’t take this type of file. files names it. |
empty_file | 422 | A file is empty. files names it. |
too_many_files | 422 | More files than one upload request or the operation takes. limit gives the most. |
idempotency_key_reused | 422 | This Idempotency-Key was used with a different request. Use a new key for a new request. |
settings_invalid | 422 | The settings don’t match the operation’s settings schema, which GET /v1/operations/{id} gives. |
nothing_to_run | 422 | No input would run. inputs gives each one’s reason. |
url_invalid | 422 | The webhook address isn’t HTTPS, isn’t on the public internet or isn’t valid: reason says which. |
events_invalid | 422 | An event isn’t one we send. events lists those we do. |
rate_limited | 429 | Too many calls this minute. Wait the seconds in Retry-After, then try again. |
too_many_file_operations | 429 | The Workspace already runs 100 jobs. Start this one when one of them ends. |
internal | 500 | A problem on our side. Try again; if it keeps happening, contact us with the request_id. |
unavailable | 503 | The operation can’t run right now because of a problem on our side. Try again in a few minutes. |
storage_unavailable | 503 | File storage can’t be reached right now. Try again in a few minutes. |
When several files in one upload request have problems, files lists each one, code names the first, and the status is the highest of theirs.
- 429: wait the seconds in
Retry-After, or for a running job to end. - 500 and 503: wait a few seconds, then retry, waiting longer after each failure.
- 409
idempotency_key_in_use: the first request is still running. Wait a moment, then retry with the same key. - Everything else: retrying the same request gets the same answer. Fix the request or the state first.
Send an Idempotency-Key with every POST /v1/uploads and POST /v1/jobs, so a retry never does anything twice: see safe retries.