StorageException

public classStorageException extendsFirebaseException


Represents an Exception resulting from an operation on aStorageReference.

Summary

Nested types

@Retention(value = RetentionPolicy.SOURCE)
@IntDef(value = )
public annotationStorageException.ErrorCode

AnErrorCode indicates the source of a failed StorageTask or operation.

Constants

static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
ERROR_UNKNOWN = -13000

Public fields

Throwable
final int
final int

Public methods

static @NonNullStorageException
static @NonNullStorageException
static @NullableStorageException
fromExceptionAndHttpCode(
    @NullableThrowable exception,
    int httpResultCode
)
synchronized @NullableThrowable

Returns the cause of thisThrowable, ornull if there is no cause.

int
int
boolean

Inherited methods

Fromjava.lang.Throwable
synchronized final void
synchronizedThrowable
synchronizedThrowable
String
String
StackTraceElement[]
synchronized final Throwable[]
synchronizedThrowable
void
void
setStackTrace(StackTraceElement[] stackTrace)
String

Constants

ERROR_BUCKET_NOT_FOUND

public static final int ERROR_BUCKET_NOT_FOUND = -13011

ERROR_CANCELED

public static final int ERROR_CANCELED = -13040

ERROR_INVALID_CHECKSUM

public static final int ERROR_INVALID_CHECKSUM = -13031

ERROR_NOT_AUTHENTICATED

public static final int ERROR_NOT_AUTHENTICATED = -13020

ERROR_NOT_AUTHORIZED

public static final int ERROR_NOT_AUTHORIZED = -13021

ERROR_OBJECT_NOT_FOUND

public static final int ERROR_OBJECT_NOT_FOUND = -13010

ERROR_PROJECT_NOT_FOUND

public static final int ERROR_PROJECT_NOT_FOUND = -13012

ERROR_QUOTA_EXCEEDED

public static final int ERROR_QUOTA_EXCEEDED = -13013

ERROR_RETRY_LIMIT_EXCEEDED

public static final int ERROR_RETRY_LIMIT_EXCEEDED = -13030

ERROR_UNKNOWN

public static final int ERROR_UNKNOWN = -13000

Public fields

cause

public Throwable cause

errorCode

public final int errorCode

httpResultCode

public final int httpResultCode

Public methods

fromErrorStatus

public static @NonNullStorageException fromErrorStatus(@NonNullStatus status)

fromException

public static @NonNullStorageException fromException(@NonNullThrowable exception)

fromExceptionAndHttpCode

public static @NullableStorageException fromExceptionAndHttpCode(
    @NullableThrowable exception,
    int httpResultCode
)

getCause

synchronized public @NullableThrowable getCause()

Returns the cause of thisThrowable, ornull if there is no cause.

getErrorCode

@StorageException.ErrorCode
public int getErrorCode()

getHttpResultCode

public int getHttpResultCode()
Returns
int

the Http result code (if one exists) from a network operation.

getIsRecoverableException

public boolean getIsRecoverableException()
Returns
boolean

True if this request failed due to a network condition that may be resolved in a future attempt.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-21 UTC.