#[non_exhaustive]pub enum AgentError {
IdentityNotFound {
did: String,
},
AlreadyDelegated {
alias: String,
},
AgentNotFound {
did: String,
},
Revoked {
did: String,
},
OutsideDelegatorScope {
capability: String,
},
CryptoError(AgentError),
DelegationError(InitError),
}Expand description
Errors from agent delegation operations (agents::add and friends).
An agent is a KERI dip-delegated identifier of a root/org identity — the same
engine devices use. These errors mirror the device delegation surface.
Usage:
match agents::add(&ctx, &root_alias, &agent_alias, curve) {
Err(AgentError::AlreadyDelegated { alias }) => { /* key in use */ }
Err(e) => return Err(e.into()),
Ok(result) => { /* agent did:keri */ }
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
IdentityNotFound
The delegating (root/org) identity could not be found in storage.
AlreadyDelegated
A key already exists under the requested agent alias — re-delegating it
would clobber an existing agent. Choose a fresh --label/alias.
AgentNotFound
No agent delegated by this root matches the given DID (or its key is missing from the keychain).
Revoked
The agent has been revoked by the delegator and cannot be rotated.
OutsideDelegatorScope
The requested agent scope exceeds the delegator’s own scope — a delegate’s authority can only narrow, never widen (subset rule).
CryptoError(AgentError)
A cryptographic operation failed (e.g. resolving the root’s curve).
DelegationError(InitError)
Authoring or anchoring the delegated agent identifier failed.
Trait Implementations§
Source§impl AuthsErrorInfo for AgentError
impl AuthsErrorInfo for AgentError
Source§fn error_code(&self) -> &'static str
fn error_code(&self) -> &'static str
Source§fn suggestion(&self) -> Option<&'static str>
fn suggestion(&self) -> Option<&'static str>
Source§impl Debug for AgentError
impl Debug for AgentError
Source§impl Display for AgentError
impl Display for AgentError
Source§impl Error for AgentError
impl Error for AgentError
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<AgentError> for AgentError
impl From<AgentError> for AgentError
Source§fn from(err: AgentError) -> Self
fn from(err: AgentError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for AgentError
impl !UnwindSafe for AgentError
impl Freeze for AgentError
impl Send for AgentError
impl Sync for AgentError
impl Unpin for AgentError
impl UnsafeUnpin for AgentError
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> Pointable for T
impl<T> Pointable for T
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.