dataplane_sdk/core/
error.rs1pub type DbResult<T> = Result<T, DbError>;
14pub type HandlerResult<T> = Result<T, HandlerError>;
15
16#[derive(Debug, thiserror::Error)]
17pub enum HandlerError {
18 #[error("Database connection error: {0}")]
19 Generic(Box<dyn std::error::Error + Send + Sync>),
20 #[error("Not supported: {0}")]
21 NotSupported(String),
22}
23
24#[derive(Debug, thiserror::Error)]
25pub enum DbError {
26 #[error("Database connection error: {0}")]
27 Generic(Box<dyn std::error::Error + Send + Sync>),
28 #[error("Not found: {0}")]
29 NotFound(String),
30 #[error("Already exists: {0}")]
31 AlreadyExists(String),
32}