Skip to main content

firebase_admin/
error.rs

1//! The crate-root error type, unifying every service module's errors.
2
3use crate::auth::AuthError;
4use crate::core::CoreError;
5
6/// The top-level error type for `firebase-admin`.
7///
8/// As additional Firebase services are added, each gets its own module error
9/// type and a corresponding variant here — existing variants are never
10/// restructured.
11#[derive(Debug, thiserror::Error)]
12pub enum Error {
13    /// An error from the `auth` module.
14    #[error(transparent)]
15    Auth(#[from] AuthError),
16
17    /// A service-independent core error.
18    #[error(transparent)]
19    Core(#[from] CoreError),
20}