Error Codes
Common Refirebase error codes and messages.
Overview
Refirebase automatically intercepts Firebase errors and converts them into standardized RefirebaseError objects containing a friendly message and a recognizable code.
Example
import { db } from './firebase';
const { error } = await db.firestore.get('users', '123');
if (error?.code === 'not-found') {
console.log("User does not exist.");
}All Error Codes
| Error Code | Message |
|---|---|
permission-denied | You do not have permission to perform this action. |
not-found | The requested resource was not found. |
already-exists | This resource already exists. |
unauthenticated | You must be signed in to perform this action. |
unavailable | The service is temporarily unavailable. Please try again. |
cancelled | The operation was cancelled. |
deadline-exceeded | The operation timed out. Please try again. |
resource-exhausted | Quota exceeded. Please try again later. |
failed-precondition | The operation failed because a precondition was not met. |
auth/user-not-found | No user found with this email address. |
auth/wrong-password | Incorrect password. |
auth/email-already-in-use | An account with this email already exists. |
auth/weak-password | Password should be at least 6 characters. |
auth/invalid-email | Invalid email address. |
auth/too-many-requests | Too many attempts. Please wait a moment and try again. |
auth/network-request-failed | Network error. Check your connection. |
auth/popup-closed-by-user | Sign-in popup was closed before completing. |
auth/cancelled-popup-request | Only one sign-in popup can be open at a time. |
storage/unauthorized | You do not have permission to access this file. |
storage/object-not-found | File not found. |
storage/quota-exceeded | Storage quota exceeded. |
storage/retry-limit-exceeded | Upload failed after too many retries. |