pub enum IdentityError {
Show 20 variants
InvalidDid(String),
NotFound(String),
AlreadyExists(String),
NotActive(String),
PermissionDenied(String),
DelegationViolation(String),
CredentialError(String),
VerificationFailed(String),
TrustChainBroken {
issuer: String,
reason: String,
},
TrustChainCycle {
issuer: String,
},
TrustChainTooDeep {
max_depth: usize,
},
NoTrustRoot,
InvalidServiceEndpoint(String),
DuplicateCredential(String),
UsernameTaken(String),
UsernameInvalid(String),
WalletError(String),
InvalidPublicKey(String),
CryptoError(String),
SerializationError(String),
}Expand description
Errors that can occur during identity operations
Variants§
InvalidDid(String)
DID could not be parsed
NotFound(String)
Identity not found in the registry
AlreadyExists(String)
Identity already exists
NotActive(String)
Identity is not in the required state
PermissionDenied(String)
Operation not permitted
DelegationViolation(String)
Delegation scope violated
CredentialError(String)
Credential error
VerificationFailed(String)
Verification failed
TrustChainBroken
Trust chain is broken — an issuer in the chain is not Active, is not in the registry, has no key the credential could verify against, or its signature does not verify (CRITICAL #41).
TrustChainCycle
A cycle was detected during trust chain traversal (CRITICAL #41). Contains the DID that was revisited.
TrustChainTooDeep
Trust chain exceeded the configured maximum traversal depth (CRITICAL #41). Acts as a DoS guard against arbitrarily long or maliciously crafted issuer chains.
NoTrustRoot
Trust chain terminated without reaching a recognized trust root (CRITICAL #41). The credential chain is internally consistent but does not anchor to any DID the verifier was configured to trust.
InvalidServiceEndpoint(String)
Invalid service endpoint URL (MEDIUM #128)
DuplicateCredential(String)
Credential already issued / replay attempt (MEDIUM #129)
UsernameTaken(String)
Username is already taken by another identity
UsernameInvalid(String)
Username does not meet validation requirements
WalletError(String)
Wallet provisioning or binding error
InvalidPublicKey(String)
Caller-supplied public key was malformed (wrong length, wrong curve, etc.). Used by BYOK registration paths.
CryptoError(String)
Cryptographic operation failed
SerializationError(String)
Serialization/deserialization error
Trait Implementations§
Source§impl Debug for IdentityError
impl Debug for IdentityError
Source§impl Display for IdentityError
impl Display for IdentityError
Source§impl Error for IdentityError
impl Error for IdentityError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<CryptoError> for IdentityError
impl From<CryptoError> for IdentityError
Source§fn from(e: CryptoError) -> Self
fn from(e: CryptoError) -> Self
Source§impl From<Error> for IdentityError
impl From<Error> for IdentityError
Source§impl From<WalletError> for IdentityError
impl From<WalletError> for IdentityError
Source§fn from(e: WalletError) -> Self
fn from(e: WalletError) -> Self
Auto Trait Implementations§
impl Freeze for IdentityError
impl RefUnwindSafe for IdentityError
impl Send for IdentityError
impl Sync for IdentityError
impl Unpin for IdentityError
impl UnsafeUnpin for IdentityError
impl UnwindSafe for IdentityError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.