1use thiserror::Error;
2
3#[derive(Error, Debug)]
5pub enum ActorError {
6 #[error(transparent)]
7 OneshotRecv(#[from] tokio::sync::oneshot::error::RecvError),
8 #[error("Failed to send on unbounded channel: {0}")]
9 UnboundedChannelSend(String),
10 #[error("Failed to recv from unbounded channel")]
11 UnboundedChannelRecv,
12 #[error("Failed to send on bounded channel: {0}")]
13 BoundedChannelSend(String),
14 #[error("Failed to recv from bounded channel")]
15 BoundedChannelRecv,
16 #[error(transparent)]
17 AddressRegexError(#[from] regex::Error),
18
19 #[error("Address {0} already exists")]
20 AddressAlreadyExist(String),
21 #[error("Address {0} not found")]
22 AddressNotFound(String),
23 #[error("Actor that's address is {0} not ready")]
24 ActorNotReady(String),
25 #[error("Actor clone failed: {0}")]
26 CloneFailed(String),
27 #[error("Unhealthy ActorSystem")]
28 UnhealthyActorSystem,
29 #[error("Message type mismatch")]
30 MessageTypeMismatch,
31}