You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| NoSuchBucket | The specified bucket does not exist. | 404 | Verify the bucket name and ensure it exists in the system, if it exists you don't have permissions to access it. |
31
+
| NoSuchKey | The specified key does not exist. | 404 | Check the key name and ensure it exists in the specified bucket, if it exists you don't have permissions to access it. |
32
+
| NoSuchUpload | The specified upload does not exist. | 404 | The uploadID provided might not exists or the Upload was previously aborted |
33
+
| InvalidJWT | The provided JWT (JSON Web Token) is invalid. | 401 | The JWT provided might be expired or malformed, provide a valid JWT |
34
+
| InvalidRequest | The request is not properly formed. | 400 | Review the request parameters and structure, ensure they meet the API's requirements, the error message will provide more details |
35
+
| TenantNotFound | The specified tenant does not exist. | 404 | The Storage service had issues while provisioning, please [Contact Support](https://supabase.com/dashboard/support/new)|
36
+
| EntityTooLarge | The entity being uploaded is too large. | 413 | Verify the max-file-limit is equal or higher to the resource you are trying to upload, you can change this value on the [Project Setting](https://supabase.com/dashboard/project/_/settings/storage)|
37
+
| InternalError | An internal server error occurred. | 500 | Investigate server logs to identify the cause of the internal error. If you think it's a Storage error please [Contact Support](https://supabase.com/dashboard/support/new)|
38
+
| ResourceAlreadyExists | The specified resource already exists. | 409 | Use a different name or identifier for the resource to avoid conflicts. Use `x-upsert:true` header to overwrite the resource. |
39
+
| InvalidBucketName | The specified bucket name is invalid. | 400 | Ensure the bucket name follows the naming conventions and does not contain invalid characters. |
40
+
| InvalidKey | The specified key is invalid. | 400 | Verify the key name and ensure it follows the naming conventions. |
41
+
| InvalidRange | The specified range is not valid. | 416 | Make sure that range provided is within the file size boundary and follow the [HTTP Range spec](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range)|
42
+
| InvalidMimeType | The specified MIME type is not valid. | 400 | Provide a valid MIME type, ensure using the standard MIME type format |
43
+
| InvalidUploadId | The specified upload ID is invalid. | 400 | The upload ID provided is invalid or missing. Make sure to provide a active uploadID |
44
+
| KeyAlreadyExists | The specified key already exists. | 409 | Use a different key name to avoid conflicts with existing keys. Use `x-upsert:true` header to overwrite the resource. |
45
+
| BucketAlreadyExists | The specified bucket already exists. | 409 | Choose a unique name for the bucket that does not conflict with existing buckets. |
46
+
| DatabaseTimeout | Timeout occurred while accessing the database. | 504 | Investigate database performance and increase the default pool size. If this error still occurs please upgrade your instance |
47
+
| InvalidSignature | The signature provided does not match the calculated signature. | 403 | Check that you are providing the correct signature format, for more information refer to [SignatureV4](https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html)|
48
+
| SignatureDoesNotMatch | The request signature does not match the calculated signature. | 403 | Check your credentials, access key id / access secret key / region that are all correct, refer to [S3 Authentication](/docs/guides/storage/s3/authentication). |
49
+
| AccessDenied | Access to the specified resource is denied. | 403 | Check that you have the correct RLS policy to allow access to this resource |
50
+
| ResourceLocked | The specified resource is locked. | 423 | This resource cannot be altered while there is a lock. Wait and try the request again |
51
+
| DatabaseError | An error occurred while accessing the database. | 500 | Investigate database logs and system configuration to identify and address the database error. |
52
+
| MissingContentLength | The Content-Length header is missing. | 411 | Ensure the Content-Length header is included in the request with the correct value. |
53
+
| MissingParameter | A required parameter is missing in the request. | 400 | Provide all required parameters in the request to fulfill the API's requirements. The message field will contain more details |
54
+
| InvalidUploadSignature | The provided upload signature is invalid. | 403 | The MultiPartUpload record was altered while the upload was ongoing, the signature do not match. Do not alter the upload record |
55
+
| LockTimeout | Timeout occurred while waiting for a lock. | 423 | The lock couldn't be acquired within the specified timeout. Wait and try the request again |
56
+
| S3Error | An error occurred related to Amazon S3. | - | Refer to Amazon S3 documentation or [Contact Support](https://supabase.com/dashboard/support/new) for assistance with resolving the S3 error. |
57
+
| S3InvalidAccessKeyId | The provided AWS access key ID is invalid. | 403 | Verify the AWS access key ID provided and ensure it is correct and active. |
58
+
| S3MaximumCredentialsLimit | The maximum number of credentials has been reached. | 400 | The maximum limit of credentials is reached. |
59
+
| InvalidChecksum | The checksum of the entity does not match. | 400 | Recalculate the checksum of the entity and ensure it matches the one provided in the request. |
60
+
| MissingPart | A part of the entity is missing. | 400 | Ensure all parts of the entity are included in the request before completing the operation. |
61
+
| SlowDown | The request rate is too high and has been throttled. | 503 | Reduce the request rate or implement exponential backoff and retry mechanisms to handle throttling. |
62
+
63
+
## Legacy Error Codes
64
+
65
+
As we are transitioning to a new error code system, you might still see the following error format:
66
+
67
+
```json
68
+
{
69
+
"httpStatusCode": 400,
70
+
"code": "error_code",
71
+
"message": "error_message"
72
+
}
73
+
```
74
+
8
75
Here's a list of the most common error codes and their potential resolutions:
9
76
10
-
## 404 not_found
77
+
###404 not_found
11
78
12
79
Indicates that the resource is not found or you don't have the correct permission to access it
13
80
**Resolution:**
@@ -16,22 +83,22 @@ Indicates that the resource is not found or you don't have the correct permissio
16
83
- Ensure you include the user `Authorization` header
17
84
- Verify the object exists
18
85
19
-
## 409 already_exists
86
+
###409 already_exists
20
87
21
88
Indicates that the resource already exists.
22
89
**Resolution:**
23
90
24
91
- Use the `upsert` functionality in order to overwrite the file. Find out more [here](/docs/guides/storage/uploads/standard-uploads#overwriting-files).
25
92
26
-
## 403 unauthorized
93
+
###403 unauthorized
27
94
28
95
You don't have permission to action this request
29
96
**Resolution:**
30
97
31
98
- Add RLS policy to grant permission. See our [Access Control docs](/docs/guides/storage/uploads/access-control) for more information.
32
99
- Ensure you include the user `Authorization` header
33
100
34
-
## 429 too many requests
101
+
###429 too many requests
35
102
36
103
This problem typically arises when a large number of clients are concurrently interacting with the Storage service, and the pooler has reached its `max_clients` limit.
37
104
@@ -40,7 +107,7 @@ This problem typically arises when a large number of clients are concurrently in
40
107
- Increase the max_clients limits of the pooler.
41
108
- Upgrade to a bigger project compute instance [here](https://supabase.com/dashboard/project/_/settings/addons).
42
109
43
-
## 544 database_timeout
110
+
###544 database_timeout
44
111
45
112
This problem arises when a high number of clients are concurrently using the Storage service, and Postgres doesn't have enough available connections to efficiently handle requests to Storage.
46
113
@@ -49,7 +116,7 @@ This problem arises when a high number of clients are concurrently using the Sto
49
116
- Increase the pool_size limits of the pooler.
50
117
- Upgrade to a bigger project compute instance [here](https://supabase.com/dashboard/project/_/settings/addons).
51
118
52
-
## 500 internal_server_error
119
+
###500 internal_server_error
53
120
54
121
This issue occurs where there is a unhandled error.
You can move objects between buckets or within the same bucket. Currently only objects up to 5GB can be moved using the API.
36
+
37
+
When moving an object, the owner of the new object will be the user who initiated the move operation. Once the object is moved, the original object will no longer exist.
38
+
39
+
### Moving objects within the same bucket
40
+
41
+
To move an object within the same bucket, you can use the `move` method.
For a user to move and copy objects, they need `select` permission on the source object and `insert` permission on the destination object. For example:
62
+
63
+
```sql
64
+
create policy "User can select their own objects (in any buckets)"
65
+
onstorage.objects
66
+
for select
67
+
to authenticated
68
+
using (
69
+
owner_id = (selectauth.uid())
70
+
);
71
+
72
+
create policy "User can upload in their own folders (in any buckets)"
When you delete one or more objects from a bucket, the files are permanently removed and not recoverable. You can delete a single object or multiple objects at once.
10
+
11
+
<Admonitiontype="note">
12
+
13
+
Deleting objects should always be done via the **Storage API** and NOT via a **SQL query**. Deleting objects via a SQL query will not remove the object from the bucket and will result in the object being orphaned.
14
+
15
+
</Admonition>
16
+
17
+
## Delete objects
18
+
19
+
To delete one or more objects, use the `remove` method.
0 commit comments