Errors and Troubleshooting

When a storage operation fails, identify the operation, bucket, and object path before changing the request or its access rules. The JavaScript Storage SDK returns { data, error }; a failed operation returns a RelationalStorageError in error. Preserve the error details and the HTTP status from the failed request when you investigate it.

Check that the project has a configured file system and that the app selects its bucket name. For setup and access grants, see Storage Setup and Configuration. For method examples, see Use the Storage SDK.

For a linked Oracle Cloud Infrastructure (OCI) Object Storage bucket, check its namespace, region, bucket name, user and tenancy Oracle Cloud Identifiers (OCIDs), API key fingerprint, and private key. For the configuration fields, see Link an OCI Object Storage Bucket in the Console.

A failed SDK file operation returns { data: null, error }. Check error.message and error.status. The error can also include code, details, and hint when the service supplies them. A status of 0 can indicate a client or network error.

Resolve Upload Failures

If upload() or update() fails, check the request in this order:

  1. Confirm that client.storage.from() uses the bucket name configured for the project.

  2. Confirm that the object path is relative to that bucket and matches the path allowed by the applicable access rule. For example, a grant for uploads/ does not cover profiles/ada.png.

  3. Check the project API key and, for authenticated access, the user JSON Web Token (JWT) and active Data Role. For token details, see Authenticating Application Users.

  4. Check the Data Grant on BAAS_STORAGE_OBJECTS. A single-file put requires both INSERT and UPDATE, and the grant’s path, content-type, and request-operation conditions must match the upload.

  5. For a request-size rejection, use a resumable multipart upload to send the file in smaller requests. Set chunkSize so that each part fits within your deployment’s request-body limits. For an example, see Upload a File in Parts. For ingress limits, see Preserve Required Headers and Request Behavior.

For multipart failures, confirm that you use the upload ID and path from the same session when you add parts or commit the upload. A multipart upload is available for download only after it is committed.

The SDK sends a direct upload() as one request without checking its size. Multipart uploads split the file into part requests; they do not increase the limits configured for each request. For a resumable upload, the SDK retries failed part requests that have no HTTP response or return HTTP 408, 429, or a 5xx status. It does not retry session creation or commit. If you resume a session directly with resumeUpload(), use a saved upload ID and specify the first part that still needs upload.

Resolve Download Failures

If download() fails, check the selected bucket and the full object path, including capitalization and prefixes. Use exists() or info() with the same bucket and path to check whether the object is available, if your role can read its metadata.

If the object exists but the download is denied, check the credentials, active Data Role, and a matching SELECT Data Grant on BAAS_STORAGE_OBJECTS. Check any path or content-type condition in that grant.

If a download fails, confirm the bucket name and full file path, including capitalization and folder prefixes. Use exists() or info() with the same bucket and path to check the file from the current app session. If the file is available but the download fails, check the caller’s SELECT Data Grant and any path or content-type conditions.

Resolve Signed URL Failures

If a signed download URL fails, check that the URL has not expired and still identifies the intended object path. To create another signed download URL, the caller needs a matching SELECT Data Grant for the create-signed-url operation. A public-style URL returned by getPublicUrl() is also backed by a signed URL. For an example, see Create Signed Download URLs.

For a signed upload, use the path and token returned by the same createSignedUploadUrl() call when you call uploadToSignedUrl(). If either call fails, check the app session and bucket, then inspect its error. If URL creation succeeds but the response lacks a token or URL, the SDK returns an error. For an example, see Upload with a Signed URL.

Resolve List and Metadata Failures

If list(), info(), or getMetadata() fails, confirm the bucket name and path or prefix. Check that the caller has a matching SELECT Data Grant for the request. A grant that restricts object_name can exclude files outside its prefix.

If list() succeeds but omits a file, check its full path and the prefix or search options passed to list(). A multipart upload that has not been committed is not included in the committed-object list.

If list() succeeds but omits a file, check the requested prefix and remove any search filter. The SDK applies the search filter and name sorting to the page returned by the service. info() uses the same metadata request as getMetadata(). The SDK rejects paths containing literal . or .. segments before sending a request.

Resolve Delete Failures

If remove() fails, confirm that each path is relative to the selected bucket. Check that the caller’s active Data Role has a matching DELETE Data Grant on BAAS_STORAGE_OBJECTS, including any path or request-operation condition.

If remove() fails, confirm that each path is relative to the selected bucket. Check that the caller’s Data Role has a DELETE Data Grant for those paths. When deleting several files, check which files remain before retrying.

Resolve Authorization Failures

A request can fail before database authorization when the project API key or user JWT is invalid or expired. For an authenticated request, confirm that the caller is signed in and that the expected Data Role is active.

Oracle DeepSec evaluates Data Grants against the request’s End User Security Context, active Data Roles, and object attributes. Confirm that a grant covers the operation, BAAS_STORAGE_OBJECTS, and the object path. If a grant tests ORA_END_USER_CONTEXT.BAASSYS.EU_CONTEXT.request.operation, check its value against the action being attempted. For storage grant examples, see Granting Access to Storage Operations.

For an access error, check the project API key and, for a signed-in user, the active session and Data Role. Confirm that a Data Grant covers the storage operation and file path.