use diesel::result::Error as DslError; use thiserror::Error; use warp::reject::Reject; pub type SResult = Result; #[derive(Error, Debug)] pub enum Error { #[error("{0} is not found")] NotFound(String), #[error("Error processing {0}")] ProcessingError(String), #[error(transparent)] DBError(#[from] DslError), #[error("General error: {0}")] Other(String), } impl Reject for Error {}