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("grpc error")]
23 GrpcError(#[from] Status),
24
25 #[error("client already running: {0}")]
27 ClientAlreadyRunning(String),
28 #[error("server already running: {0}")]
29 ServerAlreadyRunning(String),
30
31 #[error("malformed name: {0}")]
32 MalformedName(String),
33
34 #[error("datapath error")]
36 Datapath(#[from] DataPathError),
37 #[error("error sending message to data plane: {0}")]
38 DatapathSendError(String),
39 #[error("message error")]
40 MessageError(#[from] slim_datapath::messages::utils::MessageError),
41
42 #[error("payload missing")]
44 PayloadMissing,
45}