StorageRestException

class StorageRestException(error: String, description: String, response: HttpResponse, val statusCode: Int, val code: String) : RestException(source)

Represents an exception thrown if the storage API returns an error response.

Parameters

error

A short error identifier string returned by the API, if available

description

A human-readable description of the error.

statusCode

The HTTP status code returned by the API

code

Service-specific error code from the Storage API response body, such as NoSuchKey, AccessDenied or ResourceAlreadyExists. Use this to branch on the specific error rather than parsing the message. Falls back to error when the server does not send a code. See https://supabase.com/docs/guides/storage/debugging/error-codes for a list of codes.

Constructors

Link copied to clipboard
constructor(error: String, description: String, response: HttpResponse, statusCode: Int, code: String)

Properties

Link copied to clipboard
expect open val cause: Throwable?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
expect open val message: String?
Link copied to clipboard
val response: HttpResponse
Link copied to clipboard
open override val statusCode: Int