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