DatabaseError
class DatabaseError
Instances of DatabaseError are passed to callbacks when an operation failed. They contain a description of the specific error that occurred.
Summary
Constants |
|
|---|---|
const Int |
DATA_STALE = -1Internal use |
const Int |
DISCONNECTED = -4The operation had to be aborted due to a network disconnect |
const Int |
EXPIRED_TOKEN = -6The supplied auth token has expired |
const Int |
INVALID_TOKEN = -7The specified authentication token is invalid. |
const Int |
MAX_RETRIES = -8The transaction had too many retries |
const Int |
NETWORK_ERROR = -24The operation could not be performed due to a network error. |
const Int |
OPERATION_FAILED = -2The server indicated that this operation failed |
const Int |
OVERRIDDEN_BY_SET = -9The transaction was overridden by a subsequent set |
const Int |
PERMISSION_DENIED = -3This client does not have permission to perform this operation |
const Int |
UNAVAILABLE = -10The service is unavailable |
const Int |
UNKNOWN_ERROR = -999An unknown error occurred. |
const Int |
USER_CODE_EXCEPTION = -11An exception occurred in user code |
const Int |
WRITE_CANCELED = -25The write was canceled locally |
Public functions |
|
|---|---|
java-static DatabaseError |
|
DatabaseException |
Can be used if a third party needs an Exception from Firebase Database for integration purposes. |
String! |
toString() |
Constants
DISCONNECTED
const val DISCONNECTED = -4: Int
The operation had to be aborted due to a network disconnect
INVALID_TOKEN
const val INVALID_TOKEN = -7: Int
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.
NETWORK_ERROR
const val NETWORK_ERROR = -24: Int
The operation could not be performed due to a network error.
OPERATION_FAILED
const val OPERATION_FAILED = -2: Int
The server indicated that this operation failed
OVERRIDDEN_BY_SET
const val OVERRIDDEN_BY_SET = -9: Int
The transaction was overridden by a subsequent set
PERMISSION_DENIED
const val PERMISSION_DENIED = -3: Int
This client does not have permission to perform this operation
UNKNOWN_ERROR
const val UNKNOWN_ERROR = -999: Int
An unknown error occurred. Please refer to the error message and error details for more information.
Public functions
toException
fun toException(): DatabaseException
Can be used if a third party needs an Exception from Firebase Database for integration purposes.
| Returns | |
|---|---|
DatabaseException |
An exception wrapping this error, with an appropriate message and no stack trace. |