Firebase.Database.DatabaseError

Instances ofDatabaseError are passed within event arguments when an operation failed.

Summary

Instances ofDatabaseError are passed to callbacks when an operation failed. They contain a description of the specific error that occurred.

Public attributes

Disconnected = -4
const int
The operation had to be aborted due to a network disconnect.
ExpiredToken = -6
const int
The supplied auth token has expired.
InvalidToken = -7
const int
The specified authentication token is invalid.
MaxRetries = -8
const int
The transaction had too many retries.
NetworkError = -24
const int
The operation could not be performed due to a network error.
OperationFailed = -2
const int
The server indicated that this operation failed.
OverriddenBySet = -9
const int
The transaction was overridden by a subsequent set.
PermissionDenied = -3
const int
This client does not have permission to perform this operation.
Unavailable = -10
const int
The service is unavailable.
UnknownError = -999
const int
An unknown error occurred.
UserCodeException = -11
const int
An exception occurred in user code.
WriteCanceled = -25
const int
The write was canceled locally.

Properties

Code
int
Returns
One of the defined status codes declared underDatabaseError, depending on the error
Details
string
Returns
Human-readable details on the error and additional information.
Message
string
Returns
A human-readable description of the error

Public functions

ToException()
Can be used if a third party needs an Exception fromFirebaseDatabase for integration purposes.
ToString()
override string

Public attributes

Disconnected

constintDisconnected=-4

The operation had to be aborted due to a network disconnect.

ExpiredToken

constintExpiredToken=-6

The supplied auth token has expired.

InvalidToken

constintInvalidToken=-7

The specified authentication token is invalid.

The specified authentication token is invalid. This can occur when the token is malformed, expired, or the secret that was used to generate it has been revoked.

MaxRetries

constintMaxRetries=-8

The transaction had too many retries.

NetworkError

constintNetworkError=-24

The operation could not be performed due to a network error.

OperationFailed

constintOperationFailed=-2

The server indicated that this operation failed.

OverriddenBySet

constintOverriddenBySet=-9

The transaction was overridden by a subsequent set.

PermissionDenied

constintPermissionDenied=-3

This client does not have permission to perform this operation.

Unavailable

constintUnavailable=-10

The service is unavailable.

UnknownError

constintUnknownError=-999

An unknown error occurred.

An unknown error occurred. Please refer to the error message and error details for more information.

UserCodeException

constintUserCodeException=-11

An exception occurred in user code.

WriteCanceled

constintWriteCanceled=-25

The write was canceled locally.

Properties

Code

intCode

Details
Returns
One of the defined status codes declared underDatabaseError, depending on the error

Details

stringDetails

Details
Returns
Human-readable details on the error and additional information.

Message

stringMessage

Details
Returns
A human-readable description of the error

Public functions

ToException

DatabaseExceptionToException()

Can be used if a third party needs an Exception fromFirebaseDatabase for integration purposes.

Details
Returns
An exception wrapping this error, with an appropriate message and no stack trace.

ToString

overridestringToString()

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 2021-06-17 UTC.