Skip to main content

ave_core/helpers/network/
error.rs

1use thiserror::Error;
2
3#[derive(Debug, Error, Clone)]
4pub enum IntermediaryError {
5    #[error("failed to serialize message: {details}")]
6    SerializationFailed { details: String },
7
8    #[error("failed to send message to network: {details}")]
9    NetworkSendFailed { details: String },
10
11    #[error("failed to convert sender bytes to public key: {details}")]
12    InvalidPublicKey { details: String },
13
14    #[error("failed to deserialize message: {details}")]
15    DeserializationFailed { details: String },
16
17    #[error("failed to get schema_id from validation request")]
18    InvalidSchemaId,
19
20    #[error("actor not found: {path}")]
21    ActorNotFound { path: String },
22
23    #[error("failed to send message to actor '{path}': {details}")]
24    SendMessageFailed { path: String, details: String },
25
26    #[error("invalid Ed25519 public key, cannot convert to PeerId: {details}")]
27    PeerIdConversionFailed { details: String },
28}