pub enum Error {
Show 23 variants
Crypto(CryptoError),
Consensus(ConsensusError),
Agent(AgentError),
Validation(ValidationError),
System(SystemError),
Network(NetworkError),
Io(Error),
Serialization(SerializationError),
Timeout {
operation: String,
duration: Duration,
},
Other {
message: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
KeyNotFound(String),
Configuration(String),
TaskJoin(String),
PoolExhausted,
Config(String),
Did(String),
InvalidState {
message: String,
},
AuthorityNotFound {
authority: String,
},
InvalidVote {
authority: String,
reason: String,
},
DuplicateVote {
authority: String,
},
ByzantineFault {
message: String,
},
ViewChangeRequired(String),
AlreadyReached,
}Expand description
Top-level error type for all agentic-payments operations
Variants§
Crypto(CryptoError)
Cryptographic operation errors
Consensus(ConsensusError)
Consensus and voting errors
Agent(AgentError)
Agent lifecycle and communication errors
Validation(ValidationError)
Validation and trust chain errors
System(SystemError)
System configuration and initialization errors
Network(NetworkError)
Network and communication errors
Io(Error)
I/O operation errors
Serialization(SerializationError)
Serialization/deserialization errors
Timeout
Timeout errors
Other
Generic error with context
Fields
KeyNotFound(String)
Key not found error
Configuration(String)
Configuration error
TaskJoin(String)
Task join error
PoolExhausted
Pool exhausted error
Config(String)
Config error (alias for Configuration)
Did(String)
DID error
InvalidState
Invalid state error
AuthorityNotFound
Authority not found
Fields
Authority ID
InvalidVote
Invalid vote
DuplicateVote
Duplicate vote
Fields
Authority that cast duplicate vote
ByzantineFault
Byzantine fault
ViewChangeRequired(String)
View change required
AlreadyReached
Consensus already reached
Implementations§
Source§impl Error
impl Error
Sourcepub fn timeout(operation: impl Into<String>, duration: Duration) -> Self
pub fn timeout(operation: impl Into<String>, duration: Duration) -> Self
Create a timeout error
Sourcepub fn with_source(
message: impl Into<String>,
source: impl Error + Send + Sync + 'static,
) -> Self
pub fn with_source( message: impl Into<String>, source: impl Error + Send + Sync + 'static, ) -> Self
Create a generic error with a message and source
Sourcepub fn agent_pool(message: impl Into<String>) -> Self
pub fn agent_pool(message: impl Into<String>) -> Self
Create an agent pool error
Sourcepub fn verification(message: impl Into<String>) -> Self
pub fn verification(message: impl Into<String>) -> Self
Create a verification error
Sourcepub fn health_check(message: impl Into<String>) -> Self
pub fn health_check(message: impl Into<String>) -> Self
Create a health check error