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.
17 lines
396 B
17 lines
396 B
use actix_web::http::StatusCode; |
|
use actix_web::ResponseError; |
|
|
|
#[derive(thiserror::Error, Debug)] |
|
pub enum Error { |
|
#[error("Arg parse error: {0}")] |
|
ArgparseError(#[from] structopt::clap::Error), |
|
|
|
#[error("Just an error: {0}")] |
|
JustError(String), |
|
} |
|
|
|
impl ResponseError for Error { |
|
fn status_code(&self) -> actix_web::http::StatusCode { |
|
StatusCode::BAD_REQUEST |
|
} |
|
}
|
|
|