openagent-aegis-core · error
Declared module signatures, types, configuration, and source documentation.
Source: aegis/openagent-aegis-core/src/error.rs. SHA-256: de788643c270b4ca24b0ecb740416c4c537f2576e7bbe7f3730ceb6a409e6938.
This source reference follows declared modules and preserves feature attributes. It includes public declarations and implementation methods in those modules. Private-module exports and trait resolution still require the compiler; not every declaration is a crate-root import. Function bodies and constant values are omitted. Source comments describe their implementation context and are not a production deployment claim.
error::ResolverError
Errors from the DID Resolver plugin interface (AEGIS Spec §4.1).
#[derive(Debug, Error)]
pub enum ResolverError {
/// DID does not exist in the resolver's namespace.
#[error("DID not found: {did}")]
NotFound { did: String },
/// DID string is malformed.
#[error("invalid DID format: {reason}")]
InvalidFormat { reason: String },
/// Resolution did not complete within the timeout.
#[error("resolution timed out after {timeout_ms}ms for DID: {did}")]
ResolutionTimeout { did: String, timeout_ms: u64 },
/// DID has been deactivated.
#[error("DID has been deactivated: {did}")]
Deactivated { did: String },
/// Resolution failed due to network issues.
#[error("network error resolving DID {did}: {reason}")]
NetworkError { did: String, reason: String },
/// This resolver does not support DID creation.
#[error("DID creation not supported by this resolver")]
CreationNotSupported,
/// This resolver does not support DID updates.
#[error("DID update not supported by this resolver")]
UpdateNotSupported,
/// This resolver does not support DID deactivation.
#[error("DID deactivation not supported by this resolver")]
DeactivationNotSupported,
}Source line: 10.
error::AuthError
Errors from the Auth Provider plugin interface (AEGIS Spec §4.2).
#[derive(Debug, Error)]
pub enum AuthError {
/// The credential is invalid or could not be verified.
#[error("invalid credential: {reason}")]
InvalidCredential { reason: String },
/// The credential has expired.
#[error("credential expired at {expired_at}")]
CredentialExpired { expired_at: String },
/// The session has been revoked.
#[error("session revoked: {session_id}")]
SessionRevoked { session_id: String },
/// The session has expired.
#[error("session expired: {session_id}")]
SessionExpired { session_id: String },
/// The challenge has expired or is invalid.
#[error("challenge invalid: {reason}")]
ChallengeInvalid { reason: String },
/// The provider is unavailable.
#[error("auth provider unavailable: {provider}")]
ProviderUnavailable { provider: String },
/// Refresh is not supported by this provider.
#[error("refresh not supported by provider: {provider}")]
RefreshNotSupported { provider: String },
/// Revocation is not supported by this provider.
#[error("revocation not supported by provider: {provider}")]
RevocationNotSupported { provider: String },
/// Internal error within the auth provider.
#[error("auth provider internal error: {reason}")]
Internal { reason: String },
}Source line: 46.
error::PolicyError
Errors from the Policy Engine plugin interface (AEGIS Spec §4.3).
#[derive(Debug, Error)]
pub enum PolicyError {
/// Policy evaluation failed.
#[error("policy evaluation failed: {reason}")]
EvaluationFailed { reason: String },
/// Policy engine timed out (must complete within 100ms).
#[error("policy evaluation timed out after {timeout_ms}ms")]
Timeout { timeout_ms: u64 },
/// Policy engine is unavailable — fail closed.
#[error("policy engine unavailable; denying request (fail-closed)")]
EngineUnavailable,
/// No policy engine is registered.
#[error("no policy engine registered; denying request (fail-closed)")]
NoPolicyEngine,
/// Policy configuration error.
#[error("policy configuration error: {reason}")]
ConfigError { reason: String },
}Source line: 86.
error::VerificationError
Errors from the Verification Infrastructure (AEGIS Spec §5).
#[derive(Debug, Error)]
pub enum VerificationError {
/// DID resolution failed.
#[error("resolution failed for {did}: {reason}")]
ResolutionFailed { did: String, reason: String },
/// OAS schema validation failed.
#[error("schema validation failed for {did}: {reason}")]
InvalidSchema { did: String, reason: String },
/// Document signature is invalid.
#[error("invalid document signature for {did}")]
InvalidSignature { did: String },
/// Lineage chain verification failed.
#[error("lineage verification failed for {did}: {reason}")]
LineageFailed { did: String, reason: String },
/// Maximum lineage depth exceeded.
#[error("lineage depth {depth} exceeds maximum {max_depth} for {did}")]
MaxDepthExceeded {
did: String,
depth: u32,
max_depth: u32,
},
/// Identity has been revoked.
#[error("identity revoked: {did}")]
Revoked { did: String },
/// Identity has been suspended.
#[error("identity suspended: {did}")]
Suspended { did: String },
/// Human root revoked — entire lineage invalid.
#[error("human root {human_root} has been revoked")]
HumanRootRevoked { human_root: String },
/// Lineage generation number mismatch.
#[error("generation mismatch for {did}: expected {expected}, found {found}")]
GenerationMismatch {
did: String,
expected: u32,
found: u32,
},
/// Verification timed out.
#[error("verification timed out for {did}")]
Timeout { did: String },
/// Consistency violation between registries.
#[error("consistency violation for {did}: {reason}")]
ConsistencyViolation { did: String, reason: String },
}Source line: 110.
error::KeyError
Errors from the Key Management Framework (AEGIS Spec §6).
#[derive(Debug, Error)]
pub enum KeyError {
/// Key generation failed.
#[error("key generation failed: {reason}")]
GenerationFailed { reason: String },
/// Key derivation failed.
#[error("key derivation failed: {reason}")]
DerivationFailed { reason: String },
/// Key rotation failed.
#[error("key rotation failed: {reason}")]
RotationFailed { reason: String },
/// Key recovery failed.
#[error("key recovery failed: {reason}")]
RecoveryFailed { reason: String },
/// MPC ceremony failed.
#[error("MPC ceremony failed: {reason}")]
MpcFailed { reason: String },
/// Key not found.
#[error("key not found: {key_id}")]
NotFound { key_id: String },
/// Key storage error.
#[error("key storage error: {reason}")]
StorageError { reason: String },
/// Signing operation failed.
#[error("signing failed: {reason}")]
SigningFailed { reason: String },
/// Unsupported key type.
#[error("unsupported key type: {key_type}")]
UnsupportedKeyType { key_type: String },
}Source line: 166.
error::DelegationError
Errors from the Delegation Model (AEGIS Spec §9).
#[derive(Debug, Error)]
pub enum DelegationError {
/// Delegation proof is invalid.
#[error("invalid delegation proof: {reason}")]
InvalidProof { reason: String },
/// Delegation has been revoked.
#[error("delegation {delegation_id} has been revoked")]
Revoked { delegation_id: String },
/// Delegation has expired.
#[error("delegation {delegation_id} has expired")]
Expired { delegation_id: String },
/// Delegation depth exceeds maximum.
#[error("delegation depth {depth} exceeds maximum {max_depth}")]
MaxDepthExceeded { depth: u32, max_depth: u32 },
/// Scope amplification attempted — delegate cannot exceed delegator.
#[error("scope amplification not permitted: {reason}")]
ScopeAmplification { reason: String },
/// Delegator not found.
#[error("delegator not found: {did}")]
DelegatorNotFound { did: String },
/// Delegate not found.
#[error("delegate not found: {did}")]
DelegateNotFound { did: String },
}Source line: 206.
error::WalletError
Errors from the Wallet Infrastructure (AEGIS Spec §10).
#[derive(Debug, Error)]
pub enum WalletError {
/// Transaction authorization failed.
#[error("transaction authorization failed: {reason}")]
AuthorizationFailed { reason: String },
/// Signing ceremony failed.
#[error("signing ceremony failed: {reason}")]
SigningFailed { reason: String },
/// Unsupported chain.
#[error("unsupported chain: {chain}")]
UnsupportedChain { chain: String },
/// Address derivation failed.
#[error("address derivation failed for chain {chain}: {reason}")]
DerivationFailed { chain: String, reason: String },
/// Policy denied the transaction.
#[error("transaction denied by policy: {reason}")]
PolicyDenied { reason: String },
/// Obligation could not be fulfilled.
#[error("obligation fulfillment failed: {reason}")]
ObligationFailed { reason: String },
/// Batch operation partially failed.
#[error("batch operation failed: {succeeded} of {total} transactions succeeded")]
BatchPartialFailure { succeeded: usize, total: usize },
}Source line: 238.