Skip to main content

photon_core/
error.rs

1//! Identity and factory errors.
2
3use thiserror::Error;
4
5/// Errors from [`crate::IdentityFactory::reconstruct`].
6#[derive(Debug, Error)]
7pub enum IdentityError {
8    /// JSON or policy rejected the actor payload.
9    #[error("invalid actor: {0}")]
10    InvalidActor(String),
11    /// Factory/backend failure (typed; no `anyhow` in the library API).
12    #[error("identity factory: {0}")]
13    Factory(String),
14}