Ruza Drive / Guides
Errors
The error format of the Ruza Drive API and the catalogue of its codes, with what they mean and what to do: retry, fix the request or the key.
Format
An error answers with an HTTP 4xx or 5xx status and a JSON body, always of the same shape:
code: stable, documented below. It is what your program tests.message: an English sentence for the developer. It may change: do not test it nor show it as is to your users. It never holds a file name or a secret.request_id: the request's ID, also in theX-Request-Idheader. Give it to support.details: depends on the code, for instancemissing(the missing permissions),existing_id(the entry that already has the name) orlimitandreset_at(a rate limit).
Retry or not
| Answer | What to do |
|---|---|
| 429 | Wait Retry-After seconds, then retry. |
| 500, 503 | Retry with a growing delay (1 s, 2 s, 4 s...) and a cap. A POST keeps its Idempotency-Key: it runs only once. |
409 idempotency_in_progress | The same request is still running: retry a little later. |
| 412 | Read the resource again, redo the change on its current state. |
| Network cut during a POST | Retry with the same Idempotency-Key: the first answer comes back if the request had gone through. |
| Other 4xx | Do not retry as is: fix the request, the key or its permissions. |
Code catalogue
Codes are grouped by HTTP status. The "Responses" rows of the endpoint documentation link here.
| Code | HTTP | Meaning and remedy |
|---|---|---|
| invalid_request | 400 | The request is malformed: invalid JSON, an unknown or missing field, a value out of bounds. The message says which. |
| invalid_name | 400 | The name is empty, too long or holds a forbidden character (/, control characters). |
| invalid_cursor | 400 | The cursor is not recognised or comes from another key. Start again without one. |
| key_in_url | 400 | The key was put in the address. It only goes in the Authorization header; regenerate it, it may have leaked into logs. |
| chunk_size | 400 | The block does not have the expected size: 4 MiB, except the last one, shorter. |
| missing_key | 401 | No key in the Authorization: Bearer header. |
| invalid_key | 401 | The key is malformed, unknown or revoked. Check how it was copied or create another one. |
| expired_key | 401 | The key is past its expiry date. Extend it in your account: the secret stays the same. |
| missing_permission | 403 | The key lacks a permission the endpoint requires; details.missing names it. Add it to the key. |
| folder_restricted | 403 | The key is restricted to a folder and this endpoint covers the whole account. |
| ip_not_allowed | 403 | The request's IP address is not within the key's allowed ranges. |
| web_only | 403 | This action needs a recent sign-in: do it in the Ruza Drive application. |
| account_restricted | 403 | A measure on the account prevents this action. The account says which (GET /account). |
| account_suspended | 403 | The account is suspended. |
| api_blocked | 403 | API access is blocked for this account. The keys are not revoked; contact support. |
| plan_required | 403 | The account's plan does not allow this setting (link duration, permanent link, direct address...). |
| read_only | 403 | The account is read-only: it is over its quota or a measure blocks it. |
| uploads_restricted | 403 | Uploads are blocked on this account. |
| grace_download_expired | 403 | The paid plan ended and the account stores more than its quota: downloads are suspended until it frees space or subscribes again. |
| sharing_restricted | 403 | Sharing is blocked on this account. |
| share_paused | 403 | The share is paused: the owner's account or a measure suspends it. |
| content_infected | 403 | The antivirus found a threat in this file (or in a file of the selection): it can be neither shared nor opened through the API. Its owner downloads it from the application, after confirming. |
| outside_share | 403 | The item is not within this share. |
| share_root | 403 | The shared entry itself cannot be changed by a guest. |
| not_found | 404 | The resource does not exist, or it is outside the key's folder: the answer does not say which. |
| entry_not_found | 404 | The entry does not exist or is not accessible. |
| share_not_found | 404 | The link or the share does not exist. |
| member_not_found | 404 | This access does not exist. |
| name_conflict | 409 | An entry with this name already exists in the folder; details.existing_id gives its ID. |
| not_a_folder | 409 | The target entry is not a folder. |
| not_a_file | 409 | The target entry is not a file. |
| cycle | 409 | A folder cannot be moved into one of its subfolders. |
| too_deep | 409 | The tree would exceed the maximum depth. |
| root_immutable | 409 | The root cannot be renamed, moved or trashed. |
| parent_in_trash | 409 | The destination folder is in the trash. |
| not_in_trash | 409 | The entry is not in the trash. |
| upload_incomplete | 409 | Blocks are missing: GET /uploads/{id} gives those received. |
| chunk_conflict | 409 | This block was already received with a different content. |
| transfer_in_progress | 409 | An ownership transfer is in progress on this entry. |
| current_version | 409 | The current version cannot be deleted. |
| share_limit_reached | 409 | The plan's maximum number of links is reached. |
| not_shareable | 409 | This entry cannot be shared (the root, an entry in the trash...). |
| share_revoked | 409 | The link is revoked. |
| scope_unavailable | 409 | The key's folder is in the trash or deleted. The key works again once it is restored. |
| scan_pending | 409 | The antivirus is checking this file, just uploaded: retry in a few seconds. |
| idempotency_in_progress | 409 | A request with the same Idempotency-Key is still running. Retry in a moment. |
| resync_required | 410 | The cursor is older than the journal. Start the feed again without a cursor. |
| restored | 410 | The catalogue was restored from a backup. Start again without a cursor and delete nothing the server lacks. |
| upload_closed | 410 | The upload session is completed, cancelled or expired. Open another one. |
| restore_expired | 410 | The restore period is over: the item is permanently deleted. |
| access_ended | 410 | Access to this share has ended. |
| length_required | 411 | The Content-Length header is missing: a single-request upload must give it. |
| precondition_failed | 412 | The resource changed since the revision given in If-Match. Read it again and retry. |
| too_large | 413 | The body is too large: 100 MiB at most for a single-request upload, 1 MiB for JSON. Beyond, use a resumable upload. |
| archive_too_large | 413 | The selection exceeds the maximum size of a ZIP archive. |
| range_not_satisfiable | 416 | The range asked in Range is outside the file. |
| digest_mismatch | 422 | The block received does not match its Content-Digest. Send it again. |
| content_hash_mismatch | 422 | The hash given does not match the blocks received. See the uploads guide. |
| weak_password | 422 | The link's password is too weak. |
| idempotency_key_reused | 422 | The same Idempotency-Key was already used with another body. Use a new value. |
| direct_not_allowed | 422 | A direct address needs a link without password and a plan that allows it. |
| rate_limited | 429 | Too many requests for the account or the key. Wait Retry-After seconds. |
| too_many_transfers | 429 | Too many transfers at once on the account. Retry after Retry-After seconds. |
| too_many_uploads | 429 | Too many uploads open at once. Complete or cancel the others. |
| internal_error | 500 | An unexpected error. Retry; if it comes back, give the request_id to support. |
| temporarily_unavailable | 503 | The service is briefly unavailable. Retry a little later (see the status page). |
| quota_exceeded | 507 | Not enough storage left. Free some space or change plan. |