mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 01:12:24 +00:00
dav: remove anyhow dependency
This commit is contained in:
@@ -25,16 +25,12 @@ pub enum Error {
|
||||
|
||||
#[error(transparent)]
|
||||
XmlSerializationError(#[from] quick_xml::SeError),
|
||||
|
||||
#[error("Internal server error")]
|
||||
Other(#[from] anyhow::Error),
|
||||
}
|
||||
|
||||
impl actix_web::error::ResponseError for Error {
|
||||
fn status_code(&self) -> StatusCode {
|
||||
match self {
|
||||
Self::InternalError => StatusCode::INTERNAL_SERVER_ERROR,
|
||||
Self::Other(_) => StatusCode::INTERNAL_SERVER_ERROR,
|
||||
Self::NotFound => StatusCode::NOT_FOUND,
|
||||
Self::BadRequest(_) => StatusCode::BAD_REQUEST,
|
||||
Self::Unauthorized => StatusCode::UNAUTHORIZED,
|
||||
|
||||
Reference in New Issue
Block a user