Firebase Exceptions module.
This module defines the base types for exceptions and the platform-wide error codes as outlined in https://cloud.google.com/apis/design/errors.
FirebaseError
is the parent class of all exceptions raised by the Admin SDK. It contains
the code
, http_response
and cause
properties common to all Firebase exception types.
Each exception also carries a message that outlines what went wrong. This can be logged for
audit or debugging purposes.
When calling an Admin SDK API, developers can catch the parent FirebaseError
and
inspect its code
to implement fine-grained error handling. Alternatively, developers can
catch one or more subtypes of FirebaseError
. Under normal conditions, any given API can raise
only a small subset of the available exception subtypes. However, the SDK also exposes rare error
conditions like connection timeouts and other I/O errors as instances of FirebaseError
.
Therefore it is always a good idea to have a handler specified for FirebaseError
, after all the
subtype error handlers.
Exceptions
AbortedErrorexception firebase_admin.exceptions.AbortedError(message, cause=None, http_response=None) |
---|
Bases: Concurrency conflict, such as read-modify-write conflict. |
AlreadyExistsErrorexception firebase_admin.exceptions.AlreadyExistsError(message, cause=None, http_response=None) |
---|
Bases: The resource that a client tried to create already exists. |
CancelledErrorexception firebase_admin.exceptions.CancelledError(message, cause=None, http_response=None) |
---|
Bases: Request cancelled by the client. |
ConflictErrorexception firebase_admin.exceptions.ConflictError(message, cause=None, http_response=None) |
---|
Bases: Concurrency conflict, such as read-modify-write conflict. |
DataLossErrorexception firebase_admin.exceptions.DataLossError(message, cause=None, http_response=None) |
---|
Bases: Unrecoverable data loss or data corruption. |
DeadlineExceededErrorexception firebase_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’s default deadline (i.e. requested deadline is not enough for the server to process the request) and the request did not finish within the deadline. |
FailedPreconditionErrorexception firebase_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-empty directory. |
FirebaseErrorexception firebase_admin.exceptions.FirebaseError(code, message, cause=None, http_response=None) | ||||||
---|---|---|---|---|---|---|
Bases: Base class for all errors raised by the Admin SDK.
|
InternalErrorexception firebase_admin.exceptions.InternalError(message, cause=None, http_response=None) |
---|
Bases: Internal server error. |
InvalidArgumentErrorexception firebase_admin.exceptions.InvalidArgumentError(message, cause=None, http_response=None) |
---|
Bases: Client specified an invalid argument. |
NotFoundErrorexception firebase_admin.exceptions.NotFoundError(message, cause=None, http_response=None) |
---|
Bases: A specified resource is not found, or the request is rejected by undisclosed reasons, such as whitelisting. |
OutOfRangeErrorexception firebase_admin.exceptions.OutOfRangeError(message, cause=None, http_response=None) |
---|
Bases: Client specified an invalid range. |
PermissionDeniedErrorexception firebase_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’t have permission, or the API has not been enabled for the client project. |
ResourceExhaustedErrorexception firebase_admin.exceptions.ResourceExhaustedError(message, cause=None, http_response=None) |
---|
Bases: Either out of resource quota or reaching rate limiting. |
UnauthenticatedErrorexception firebase_admin.exceptions.UnauthenticatedError(message, cause=None, http_response=None) |
---|
Bases: Request not authenticated due to missing, invalid, or expired OAuth token. |
UnavailableErrorexception firebase_admin.exceptions.UnavailableError(message, cause=None, http_response=None) |
---|
Bases: Service unavailable. Typically the server is down. |
UnknownErrorexception firebase_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 |