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 intThe operation had to be aborted due to a network disconnect. |
ExpiredToken = -6 | const intThe supplied auth token has expired. |
InvalidToken = -7 | const intThe specified authentication token is invalid. |
MaxRetries = -8 | const intThe transaction had too many retries. |
NetworkError = -24 | const intThe operation could not be performed due to a network error. |
OperationFailed = -2 | const intThe server indicated that this operation failed. |
OverriddenBySet = -9 | const intThe transaction was overridden by a subsequent set. |
PermissionDenied = -3 | const intThis client does not have permission to perform this operation. |
Unavailable = -10 | const intThe service is unavailable. |
UnknownError = -999 | const intAn unknown error occurred. |
UserCodeException = -11 | const intAn exception occurred in user code. |
WriteCanceled = -25 | const intThe write was canceled locally. |
Properties | |||
|---|---|---|---|
Code | intReturns | One of the defined status codes declared underDatabaseError, depending on the error | |
Details | stringReturns | Human-readable details on the error and additional information. | |
Message | stringReturns | A human-readable description of the error | |
Public functions | |
|---|---|
ToException() | |
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()
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.