You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
433 B
22 lines
433 B
use diesel::result::Error as DslError; |
|
use thiserror::Error; |
|
use warp::reject::Reject; |
|
|
|
pub type SResult<T> = Result<T, Error>; |
|
|
|
#[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 {}
|
|
|