aboutsummaryrefslogtreecommitdiff
path: root/src/api/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/error.rs')
-rw-r--r--src/api/error.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/api/error.rs b/src/api/error.rs
index a3cdfdbd..bd340fa6 100644
--- a/src/api/error.rs
+++ b/src/api/error.rs
@@ -72,6 +72,12 @@ impl From<roxmltree::Error> for Error {
}
}
+impl From<quick_xml::de::DeError> for Error {
+ fn from(err: quick_xml::de::DeError) -> Self {
+ Self::InvalidXML(format!("{}", err))
+ }
+}
+
impl Error {
/// Get the HTTP status code that best represents the meaning of the error for the client
pub fn http_status_code(&self) -> StatusCode {