diff --git a/src/app/index.ts b/src/app/index.ts index 02a8509653..5308e414e2 100644 --- a/src/app/index.ts +++ b/src/app/index.ts @@ -29,4 +29,6 @@ export { initializeApp, getApp, getApps, deleteApp } from './lifecycle'; export { Credential, ServiceAccount, GoogleOAuthAccessToken } from './credential'; export { applicationDefault, cert, refreshToken } from './credential-factory'; +export { FirebaseAppError, AppErrorCodes } from '../utils/error'; + export const SDK_VERSION = getSdkVersion(); diff --git a/src/auth/index.ts b/src/auth/index.ts index a559a706f8..f350b28837 100644 --- a/src/auth/index.ts +++ b/src/auth/index.ts @@ -164,3 +164,8 @@ export { UserMetadata, UserRecord, } from './user-record'; + +export { + FirebaseAuthError, + AuthClientErrorCode, +} from '../utils/error'; diff --git a/src/database/index.ts b/src/database/index.ts index d276b27a08..7a17deb751 100644 --- a/src/database/index.ts +++ b/src/database/index.ts @@ -125,3 +125,5 @@ function getDatabaseInstance(options: { url?: string; app?: App }): Database { const dbService = firebaseApp.getOrInitService('database', (app) => new DatabaseService(app)); return dbService.getDatabase(options.url); } + +export { FirebaseDatabaseError } from '../utils/error'; diff --git a/src/firestore/index.ts b/src/firestore/index.ts index ff6954cefa..f906f382e2 100644 --- a/src/firestore/index.ts +++ b/src/firestore/index.ts @@ -220,3 +220,5 @@ export function initializeFirestore( return firestoreService.initializeDatabase(databaseId, settings); } + +export { FirebaseFirestoreError } from '../utils/error'; diff --git a/src/installations/index.ts b/src/installations/index.ts index c790c2c8ce..1d6a39dc35 100644 --- a/src/installations/index.ts +++ b/src/installations/index.ts @@ -61,3 +61,5 @@ export function getInstallations(app?: App): Installations { const firebaseApp: FirebaseApp = app as FirebaseApp; return firebaseApp.getOrInitService('installations', (app) => new Installations(app)); } + +export { FirebaseInstallationsError, InstallationsClientErrorCode } from '../utils/error'; diff --git a/src/instance-id/index.ts b/src/instance-id/index.ts index 6d014aeebb..1a9c06d3bc 100644 --- a/src/instance-id/index.ts +++ b/src/instance-id/index.ts @@ -70,3 +70,5 @@ export function getInstanceId(app?: App): InstanceId { const firebaseApp: FirebaseApp = app as FirebaseApp; return firebaseApp.getOrInitService('instanceId', (app) => new InstanceId(app)); } + +export { FirebaseInstanceIdError, InstanceIdClientErrorCode } from '../utils/error'; diff --git a/src/messaging/index.ts b/src/messaging/index.ts index 2371004e33..298a2d5f10 100644 --- a/src/messaging/index.ts +++ b/src/messaging/index.ts @@ -100,3 +100,5 @@ export function getMessaging(app?: App): Messaging { const firebaseApp: FirebaseApp = app as FirebaseApp; return firebaseApp.getOrInitService('messaging', (app) => new Messaging(app)); } + +export { FirebaseMessagingError, MessagingClientErrorCode } from '../utils/error'; diff --git a/src/project-management/index.ts b/src/project-management/index.ts index 3a1f8490e1..cc23066681 100644 --- a/src/project-management/index.ts +++ b/src/project-management/index.ts @@ -62,3 +62,5 @@ export function getProjectManagement(app?: App): ProjectManagement { const firebaseApp: FirebaseApp = app as FirebaseApp; return firebaseApp.getOrInitService('projectManagement', (app) => new ProjectManagement(app)); } + +export { FirebaseProjectManagementError, ProjectManagementErrorCode } from '../utils/error';