slim_controller/
errors.rs1use slim_auth::errors::AuthError;
5use slim_config::grpc::errors::ConfigError;
6use slim_datapath::errors::DataPathError;
7use thiserror::Error;
8use tonic::Status;
9
10#[derive(Error, Debug)]
11pub enum ControllerError {
12 #[error("configuration error")]
14 ConfigError(#[from] ConfigError),
15
16 #[error("controller already started")]
18 AlreadyStarted,
19 #[error("controller already stopped")]
20 AlreadyStopped,
21 #[error("timeout waiting for shutdown to complete")]
22 ShutdownTimeout,
23 #[error("grpc error")]
24 GrpcError(#[from] Status),
25
26 #[error("client already running: {0}")]
28 ClientAlreadyRunning(String),
29 #[error("server already running: {0}")]
30 ServerAlreadyRunning(String),
31
32 #[error("malformed name: {0}")]
33 MalformedName(String),
34
35 #[error("datapath error")]
37 Datapath(#[from] DataPathError),
38 #[error("error sending message to data plane: {0}")]
39 DatapathSendError(String),
40 #[error("auth error")]
41 Auth(#[from] AuthError),
42 #[error("message error")]
43 MessageError(#[from] slim_datapath::messages::utils::MessageError),
44
45 #[error("payload missing")]
47 PayloadMissing,
48}