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