firebase_admin.exceptions module Stay organized with collections Save and categorize content based on your preferences.
Firebase Exceptions module.
This module defines the base types for exceptions and the platform-wide error codes as outlined inhttps://cloud.google.com/apis/design/errors.
FirebaseError is the parent class of all exceptions raised by the Admin SDK. It containsthecode,http_response andcause properties common to all Firebase exception types.Each exception also carries a message that outlines what went wrong. This can be logged foraudit or debugging purposes.
When calling an Admin SDK API, developers can catch the parentFirebaseError andinspect itscode to implement fine-grained error handling. Alternatively, developers cancatch one or more subtypes ofFirebaseError. Under normal conditions, any given API can raiseonly a small subset of the available exception subtypes. However, the SDK also exposes rare errorconditions like connection timeouts and other I/O errors as instances ofFirebaseError.Therefore it is always a good idea to have a handler specified forFirebaseError, after all thesubtype error handlers.
Exceptions
AbortedErrorexceptionfirebase_admin.exceptions.AbortedError(message,cause=None,http_response=None) |
|---|
Bases: Concurrency conflict, such as read-modify-write conflict. |
AlreadyExistsErrorexceptionfirebase_admin.exceptions.AlreadyExistsError(message,cause=None,http_response=None) |
|---|
Bases: The resource that a client tried to create already exists. |
CancelledErrorexceptionfirebase_admin.exceptions.CancelledError(message,cause=None,http_response=None) |
|---|
Bases: Request cancelled by the client. |
ConflictErrorexceptionfirebase_admin.exceptions.ConflictError(message,cause=None,http_response=None) |
|---|
Bases: Concurrency conflict, such as read-modify-write conflict. |
DataLossErrorexceptionfirebase_admin.exceptions.DataLossError(message,cause=None,http_response=None) |
|---|
Bases: Unrecoverable data loss or data corruption. |
DeadlineExceededErrorexceptionfirebase_admin.exceptions.DeadlineExceededError(message,cause=None,http_response=None) |
|---|
Bases: Request deadline exceeded. This will happen only if the caller sets a deadline that is shorter than the method’sdefault deadline (i.e. requested deadline is not enough for the server to process therequest) and the request did not finish within the deadline. |
FailedPreconditionErrorexceptionfirebase_admin.exceptions.FailedPreconditionError(message,cause=None,http_response=None) |
|---|
Bases: Request can not be executed in the current system state, such as deleting a non-emptydirectory. |
FirebaseErrorexceptionfirebase_admin.exceptions.FirebaseError(code,message,cause=None,http_response=None) | ||||||
|---|---|---|---|---|---|---|
Bases: Base class for all errors raised by the Admin SDK.
|
InternalErrorexceptionfirebase_admin.exceptions.InternalError(message,cause=None,http_response=None) |
|---|
Bases: Internal server error. |
InvalidArgumentErrorexceptionfirebase_admin.exceptions.InvalidArgumentError(message,cause=None,http_response=None) |
|---|
Bases: Client specified an invalid argument. |
NotFoundErrorexceptionfirebase_admin.exceptions.NotFoundError(message,cause=None,http_response=None) |
|---|
Bases: A specified resource is not found, or the request is rejected by undisclosed reasons, suchas whitelisting. |
OutOfRangeErrorexceptionfirebase_admin.exceptions.OutOfRangeError(message,cause=None,http_response=None) |
|---|
Bases: Client specified an invalid range. |
PermissionDeniedErrorexceptionfirebase_admin.exceptions.PermissionDeniedError(message,cause=None,http_response=None) |
|---|
Bases: Client does not have sufficient permission. This can happen because the OAuth token does not have the right scopes, the client doesn’thave permission, or the API has not been enabled for the client project. |
ResourceExhaustedErrorexceptionfirebase_admin.exceptions.ResourceExhaustedError(message,cause=None,http_response=None) |
|---|
Bases: Either out of resource quota or reaching rate limiting. |
UnauthenticatedErrorexceptionfirebase_admin.exceptions.UnauthenticatedError(message,cause=None,http_response=None) |
|---|
Bases: Request not authenticated due to missing, invalid, or expired OAuth token. |
UnavailableErrorexceptionfirebase_admin.exceptions.UnavailableError(message,cause=None,http_response=None) |
|---|
Bases: Service unavailable. Typically the server is down. |
UnknownErrorexceptionfirebase_admin.exceptions.UnknownError(message,cause=None,http_response=None) |
|---|
Bases: Unknown server error. |
Constants
ABORTEDfirebase_admin.exceptions.ABORTED='ABORTED' |
|---|
Error code for |
ALREADY_EXISTSfirebase_admin.exceptions.ALREADY_EXISTS='ALREADY_EXISTS' |
|---|
Error code for |
CANCELLEDfirebase_admin.exceptions.CANCELLED='CANCELLED' |
|---|
Error code for |
CONFLICTfirebase_admin.exceptions.CONFLICT='CONFLICT' |
|---|
Error code for |
DATA_LOSSfirebase_admin.exceptions.DATA_LOSS='DATA_LOSS' |
|---|
Error code for |
DEADLINE_EXCEEDEDfirebase_admin.exceptions.DEADLINE_EXCEEDED='DEADLINE_EXCEEDED' |
|---|
Error code for |
FAILED_PRECONDITIONfirebase_admin.exceptions.FAILED_PRECONDITION='FAILED_PRECONDITION' |
|---|
Error code for |
INTERNALfirebase_admin.exceptions.INTERNAL='INTERNAL' |
|---|
Error code for |
INVALID_ARGUMENTfirebase_admin.exceptions.INVALID_ARGUMENT='INVALID_ARGUMENT' |
|---|
Error code for |
NOT_FOUNDfirebase_admin.exceptions.NOT_FOUND='NOT_FOUND' |
|---|
Error code for |
OUT_OF_RANGEfirebase_admin.exceptions.OUT_OF_RANGE='OUT_OF_RANGE' |
|---|
Error code for |
PERMISSION_DENIEDfirebase_admin.exceptions.PERMISSION_DENIED='PERMISSION_DENIED' |
|---|
Error code for |
RESOURCE_EXHAUSTEDfirebase_admin.exceptions.RESOURCE_EXHAUSTED='RESOURCE_EXHAUSTED' |
|---|
Error code for |
UNAUTHENTICATEDfirebase_admin.exceptions.UNAUTHENTICATED='UNAUTHENTICATED' |
|---|
Error code for |
UNAVAILABLEfirebase_admin.exceptions.UNAVAILABLE='UNAVAILABLE' |
|---|
Error code for |
UNKNOWNfirebase_admin.exceptions.UNKNOWN='UNKNOWN' |
|---|
Error code for |
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-03-12 UTC.