ไปที่คอนโซล

firebase_admin.exceptions module

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

exception firebase_admin.exceptions.AbortedError(message, cause=None, http_response=None)

Bases: firebase_admin.exceptions.FirebaseError

Concurrency conflict, such as read-modify-write conflict.

exception firebase_admin.exceptions.AlreadyExistsError(message, cause=None, http_response=None)

Bases: firebase_admin.exceptions.FirebaseError

The resource that a client tried to create already exists.

exception firebase_admin.exceptions.CancelledError(message, cause=None, http_response=None)

Bases: firebase_admin.exceptions.FirebaseError

Request cancelled by the client.

exception firebase_admin.exceptions.ConflictError(message, cause=None, http_response=None)

Bases: firebase_admin.exceptions.FirebaseError

Concurrency conflict, such as read-modify-write conflict.

exception firebase_admin.exceptions.DataLossError(message, cause=None, http_response=None)

Bases: firebase_admin.exceptions.FirebaseError

Unrecoverable data loss or data corruption.

exception firebase_admin.exceptions.DeadlineExceededError(message, cause=None, http_response=None)

Bases: firebase_admin.exceptions.FirebaseError

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.

exception firebase_admin.exceptions.FailedPreconditionError(message, cause=None, http_response=None)

Bases: firebase_admin.exceptions.FirebaseError

Request can not be executed in the current system state, such as deleting a non-empty directory.

exception firebase_admin.exceptions.FirebaseError(code, message, cause=None, http_response=None)

Bases: exceptions.Exception

Base class for all errors raised by the Admin SDK.

Parameters:
cause
code
http_response
exception firebase_admin.exceptions.InternalError(message, cause=None, http_response=None)

Bases: firebase_admin.exceptions.FirebaseError

Internal server error.

exception firebase_admin.exceptions.InvalidArgumentError(message, cause=None, http_response=None)

Bases: firebase_admin.exceptions.FirebaseError

Client specified an invalid argument.

exception firebase_admin.exceptions.NotFoundError(message, cause=None, http_response=None)

Bases: firebase_admin.exceptions.FirebaseError

A specified resource is not found, or the request is rejected by undisclosed reasons, such as whitelisting.

exception firebase_admin.exceptions.OutOfRangeError(message, cause=None, http_response=None)

Bases: firebase_admin.exceptions.FirebaseError

Client specified an invalid range.

exception firebase_admin.exceptions.PermissionDeniedError(message, cause=None, http_response=None)

Bases: firebase_admin.exceptions.FirebaseError

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.

exception firebase_admin.exceptions.ResourceExhaustedError(message, cause=None, http_response=None)

Bases: firebase_admin.exceptions.FirebaseError

Either out of resource quota or reaching rate limiting.

exception firebase_admin.exceptions.UnauthenticatedError(message, cause=None, http_response=None)

Bases: firebase_admin.exceptions.FirebaseError

Request not authenticated due to missing, invalid, or expired OAuth token.

exception firebase_adm