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

Internal use

const Int

The operation had to be aborted due to a network disconnect

const Int

The supplied auth token has expired

const Int

The specified authentication token is invalid.

const Int

The transaction had too many retries

const Int

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

const Int

The server indicated that this operation failed

const Int

The transaction was overridden by a subsequent set

const Int

This client does not have permission to perform this operation

const Int

The service is unavailable

const Int

An unknown error occurred.

const Int

An exception occurred in user code

const Int

The 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!

Public properties

Int
String!
String!

Constants

DATA_STALE

const val DATA_STALE = -1: Int

Internal use

DISCONNECTED

const val DISCONNECTED = -4: Int

The operation had to be aborted due to a network disconnect

EXPIRED_TOKEN

const val EXPIRED_TOKEN = -6: Int

The supplied auth token has expired

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.

MAX_RETRIES

const val MAX_RETRIES = -8: Int

The transaction had too many retries

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

UNAVAILABLE

const val UNAVAILABLE = -10: Int

The service is unavailable

UNKNOWN_ERROR

const val UNKNOWN_ERROR = -999: Int

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

USER_CODE_EXCEPTION

const val USER_CODE_EXCEPTION = -11: Int

An exception occurred in user code

WRITE_CANCELED

const val WRITE_CANCELED = -25: Int

The write was canceled locally

Public functions

fromException

java-static fun fromException(e: Throwable): DatabaseError

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.

toString

fun toString(): String!

Public properties

code

val codeInt

details

val detailsString!

message

val messageString!