firestoreServerToClientCode top-level constant
Firestore server to client enum error codes. https://cloud.google.com/firestore/docs/use-rest-api#error_codes
Implementation
@internal
const firestoreServerToClientCode = {
// The operation was aborted, typically due to a concurrency issue like transaction aborts, etc.
'ABORTED': FirestoreClientErrorCode.aborted,
// Some document that we attempted to create already exists.
'ALREADY_EXISTS': FirestoreClientErrorCode.alreadyExists,
// The operation was cancelled (typically by the caller).
'CANCELLED': FirestoreClientErrorCode.cancelled,
// Unrecoverable data loss or corruption.
'DATA_LOSS': FirestoreClientErrorCode.dataLoss,
// Deadline expired before operation could complete.
'DEADLINE_EXCEEDED': FirestoreClientErrorCode.deadlineExceeded,
// Operation was rejected because the system is not in a state required for the operation's execution.
'FAILED_PRECONDITION': FirestoreClientErrorCode.failedPrecondition,
// Internal errors.
'INTERNAL': FirestoreClientErrorCode.internal,
// Client specified an invalid argument.
'INVALID_ARGUMENT': FirestoreClientErrorCode.invalidArgument,
// Some requested document was not found.
'NOT_FOUND': FirestoreClientErrorCode.notFound,
// The operation completed successfully.
'OK': FirestoreClientErrorCode.ok,
// Operation was attempted past the valid range.
'OUT_OF_RANGE': FirestoreClientErrorCode.outOfRange,
// The caller does not have permission to execute the specified operation.
'PERMISSION_DENIED': FirestoreClientErrorCode.permissionDenied,
// Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space.
'RESOURCE_EXHAUSTED': FirestoreClientErrorCode.resourceExhausted,
// The request does not have valid authentication credentials for the operation.
'UNAUTHENTICATED': FirestoreClientErrorCode.unauthenticated,
// The service is currently unavailable.
'UNAVAILABLE': FirestoreClientErrorCode.unavailable,
// Operation is not implemented or not supported/enabled.
'UNIMPLEMENTED': FirestoreClientErrorCode.unimplemented,
// Unknown error or an error from a different error domain.
'UNKNOWN': FirestoreClientErrorCode.unknown,
};