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.
12    #[error(transparent)]
13    Other(#[from] anyhow::Error),
14}