dav: remove anyhow dependency

This commit is contained in:
Lennart
2024-10-31 18:15:44 +01:00
parent 9db7f629f2
commit 764f9401ac
4 changed files with 2 additions and 8 deletions

View File

@@ -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,