Skip to content

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:

{
  "error": {
    "code": "name_conflict",
    "message": "an entry with this name already exists in the folder",
    "request_id": "3f9c1a7e2b4d4e8f9a0b1c2d3e4f5a6b",
    "details": {
      "existing_id": "5f0c8a4e-2d71-4b7e-9a3c-1e2f3a4b5c6d",
      "existing_kind": "file"
    }
  }
}
  • 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 the X-Request-Id header. Give it to support.
  • details: depends on the code, for instance missing (the missing permissions), existing_id (the entry that already has the name) or limit and reset_at (a rate limit).

Retry or not

AnswerWhat to do
429Wait Retry-After seconds, then retry.
500, 503Retry 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_progressThe same request is still running: retry a little later.
412Read the resource again, redo the change on its current state.
Network cut during a POSTRetry with the same Idempotency-Key: the first answer comes back if the request had gone through.
Other 4xxDo 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.

CodeHTTPMeaning and remedy
invalid_request400The request is malformed: invalid JSON, an unknown or missing field, a value out of bounds. The message says which.
invalid_name400The name is empty, too long or holds a forbidden character (/, control characters).
invalid_cursor400The cursor is not recognised or comes from another key. Start again without one.
key_in_url400The key was put in the address. It only goes in the Authorization header; regenerate it, it may have leaked into logs.
chunk_size400The block does not have the expected size: 4 MiB, except the last one, shorter.
missing_key401No key in the Authorization: Bearer header.
invalid_key401The key is malformed, unknown or revoked. Check how it was copied or create another one.
expired_key401The key is past its expiry date. Extend it in your account: the secret stays the same.
missing_permission403The key lacks a permission the endpoint requires; details.missing names it. Add it to the key.
folder_restricted403The key is restricted to a folder and this endpoint covers the whole account.
ip_not_allowed403The request's IP address is not within the key's allowed ranges.
web_only403This action needs a recent sign-in: do it in the Ruza Drive application.
account_restricted403A measure on the account prevents this action. The account says which (GET /account).
account_suspended403The account is suspended.
api_blocked403API access is blocked for this account. The keys are not revoked; contact support.
plan_required403The account's plan does not allow this setting (link duration, permanent link, direct address...).
read_only403The account is read-only: it is over its quota or a measure blocks it.
uploads_restricted403Uploads are blocked on this account.
grace_download_expired403The paid plan ended and the account stores more than its quota: downloads are suspended until it frees space or subscribes again.
sharing_restricted403Sharing is blocked on this account.
share_paused403The share is paused: the owner's account or a measure suspends it.
content_infected403The 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_share403The item is not within this share.
share_root403The shared entry itself cannot be changed by a guest.
not_found404The resource does not exist, or it is outside the key's folder: the answer does not say which.
entry_not_found404The entry does not exist or is not accessible.
share_not_found404The link or the share does not exist.
member_not_found404This access does not exist.
name_conflict409An entry with this name already exists in the folder; details.existing_id gives its ID.
not_a_folder409The target entry is not a folder.
not_a_file409The target entry is not a file.
cycle409A folder cannot be moved into one of its subfolders.
too_deep409The tree would exceed the maximum depth.
root_immutable409The root cannot be renamed, moved or trashed.
parent_in_trash409The destination folder is in the trash.
not_in_trash409The entry is not in the trash.
upload_incomplete409Blocks are missing: GET /uploads/{id} gives those received.
chunk_conflict409This block was already received with a different content.
transfer_in_progress409An ownership transfer is in progress on this entry.
current_version409The current version cannot be deleted.
share_limit_reached409The plan's maximum number of links is reached.
not_shareable409This entry cannot be shared (the root, an entry in the trash...).
share_revoked409The link is revoked.
scope_unavailable409The key's folder is in the trash or deleted. The key works again once it is restored.
scan_pending409The antivirus is checking this file, just uploaded: retry in a few seconds.
idempotency_in_progress409A request with the same Idempotency-Key is still running. Retry in a moment.
resync_required410The cursor is older than the journal. Start the feed again without a cursor.
restored410The catalogue was restored from a backup. Start again without a cursor and delete nothing the server lacks.
upload_closed410The upload session is completed, cancelled or expired. Open another one.
restore_expired410The restore period is over: the item is permanently deleted.
access_ended410Access to this share has ended.
length_required411The Content-Length header is missing: a single-request upload must give it.
precondition_failed412The resource changed since the revision given in If-Match. Read it again and retry.
too_large413The body is too large: 100 MiB at most for a single-request upload, 1 MiB for JSON. Beyond, use a resumable upload.
archive_too_large413The selection exceeds the maximum size of a ZIP archive.
range_not_satisfiable416The range asked in Range is outside the file.
digest_mismatch422The block received does not match its Content-Digest. Send it again.
content_hash_mismatch422The hash given does not match the blocks received. See the uploads guide.
weak_password422The link's password is too weak.
idempotency_key_reused422The same Idempotency-Key was already used with another body. Use a new value.
direct_not_allowed422A direct address needs a link without password and a plan that allows it.
rate_limited429Too many requests for the account or the key. Wait Retry-After seconds.
too_many_transfers429Too many transfers at once on the account. Retry after Retry-After seconds.
too_many_uploads429Too many uploads open at once. Complete or cancel the others.
internal_error500An unexpected error. Retry; if it comes back, give the request_id to support.
temporarily_unavailable503The service is briefly unavailable. Retry a little later (see the status page).
quota_exceeded507Not enough storage left. Free some space or change plan.
Next guideRate limits