Errors
The problem document every failed request returns, and every error code the Storage API uses.
The problem document
Every failure is an RFC 9457 problem document, sent as application/problem+json:
{
"type": "https://docs.digitospace.com/problems/conflict",
"title": "Conflict",
"status": 409,
"code": "bucket_not_empty",
"detail": "the bucket still holds 3 files; delete them first, or delete with force=true",
"instance": "/v1/projects/01k5ztq3jb9y2a1m9v2xw8e0ha/buckets/invoices",
"requestId": "01m3c081dbf3j55x7hsa7wc1yj",
"retryable": false
}Handle a failure
typelinks to a page about that kind of problem. See Problems.codeis the contract. Branch on it. It changes only with a deprecation.typeandstatusare the class of failure, for handling whole categories.detailis a sentence for a person and may be reworded at any time.retryablesays whether the same request could succeed if sent again later.resourcenames the missing thing onnot_found:project,bucket,object,folder, orupload.issueslists every field that is wrong onvalidation_failed, each with afield, acode(required,too_long,out_of_rangeorinvalid) and amessage.
Codes
| Code | Status | Retryable | When |
|---|---|---|---|
already_exists | 409 | no | Something with that identity already exists |
bucket_limit_reached | 403 | no | The project already holds as many buckets as it can |
bucket_name_taken | 409 | no | Another bucket in the project has that name |
bucket_not_empty | 409 | no | The bucket still holds files; delete them, or delete with force=true |
conflict | 409 | no | The request clashes with the current state |
folder_not_empty | 409 | no | The folder still holds files; delete them first |
forbidden | 403 | no | The caller may not do this |
internal | 500 | no | Something went wrong on our side |
invalid_request | 400 | no | The request is malformed: a bad cursor, limit, query value or JSON body |
method_not_allowed | 405 | no | The route exists but not for that method; see Allow |
not_found | 404 | no | The route, project, bucket, file or upload does not exist |
payload_too_large | 413 | no | The body is over 1 MB |
preset_limit_reached | 403 | no | The bucket already has 20 presets; delete one first |
public_buckets_unavailable | 403 | no | Buckets cannot be made public yet |
storage_quota_reached | 403 | no | The file does not fit in the project’s storage |
taken_down | 403 | no | We took the file or its bucket down because it broke our terms, so it cannot be downloaded or copied |
unauthenticated | 401 | no | The bearer token is missing or not one we accept |
unavailable | 503 | yes | Something the request depends on is not available right now |
unsupported_media_type | 415 | no | The body is not application/json |
upload_finished | 409 | no | The upload expired, was cancelled or refused, or its file was since replaced |
upload_incomplete | 409 | no | The file has not arrived; send it with the upload link, then finish again |
upload_limit_reached | 403 | no | The project has too many uploads in progress |
upload_size_mismatch | 409 | no | The file is larger than declared, or its digest does not match |
validation_failed | 422 | no | Fields are wrong; see issues |
Last updated