diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2021-05-02 22:30:56 +0200 |
---|---|---|
committer | Gitea <gitea@fake.local> | 2021-05-03 21:55:30 +0200 |
commit | 631c36b3ff76f9b09a5aed54dc343469a89f9989 (patch) | |
tree | 3f9c3b9741de7afb012cd354e3da6316750c13b5 /src/api/error.rs | |
parent | ee2a3d363b70ca9e7572c30ca9547f7fd7f8f608 (diff) | |
download | garage-631c36b3ff76f9b09a5aed54dc343469a89f9989.tar.gz garage-631c36b3ff76f9b09a5aed54dc343469a89f9989.zip |
S3 API: support ListBuckets
Diffstat (limited to 'src/api/error.rs')
-rw-r--r-- | src/api/error.rs | 6 |
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 { |