mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 17:12:22 +00:00
change PropReadOnly
This commit is contained in:
@@ -17,8 +17,8 @@ pub enum Error {
|
|||||||
#[error("Internal server error :(")]
|
#[error("Internal server error :(")]
|
||||||
InternalError,
|
InternalError,
|
||||||
|
|
||||||
#[error("prop {0} is read-only")]
|
#[error("prop is read-only")]
|
||||||
PropReadOnly(String),
|
PropReadOnly,
|
||||||
|
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
XmlDecodeError(#[from] quick_xml::DeError),
|
XmlDecodeError(#[from] quick_xml::DeError),
|
||||||
@@ -36,7 +36,7 @@ impl actix_web::error::ResponseError for Error {
|
|||||||
Self::BadRequest(_) => StatusCode::BAD_REQUEST,
|
Self::BadRequest(_) => StatusCode::BAD_REQUEST,
|
||||||
Self::Unauthorized => StatusCode::UNAUTHORIZED,
|
Self::Unauthorized => StatusCode::UNAUTHORIZED,
|
||||||
Self::XmlDecodeError(_) => StatusCode::BAD_REQUEST,
|
Self::XmlDecodeError(_) => StatusCode::BAD_REQUEST,
|
||||||
Error::PropReadOnly(_) => StatusCode::CONFLICT,
|
Error::PropReadOnly => StatusCode::CONFLICT,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user