diff options
author | Alex Auvolat <alex@adnab.me> | 2022-05-13 13:51:34 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-05-13 13:51:34 +0200 |
commit | 983037d965fdcdf089b09fa90fac31501defae9e (patch) | |
tree | 716efccaf76d5e165183d550cfc4bcf894482c7d /src/web | |
parent | e4e1f8f0d60545d81c1082ca5f0194962a4a4f79 (diff) | |
download | garage-983037d965fdcdf089b09fa90fac31501defae9e.tar.gz garage-983037d965fdcdf089b09fa90fac31501defae9e.zip |
Possibility of different error types for different APIs
Diffstat (limited to 'src/web')
-rw-r--r-- | src/web/error.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/web/error.rs b/src/web/error.rs index 55990e9d..e9ed5314 100644 --- a/src/web/error.rs +++ b/src/web/error.rs @@ -2,6 +2,7 @@ use err_derive::Error; use hyper::header::HeaderValue; use hyper::{HeaderMap, StatusCode}; +use garage_api::generic_server::ApiError; use garage_util::error::Error as GarageError; /// Errors of this crate @@ -52,7 +53,7 @@ impl Error { pub fn add_headers(&self, header_map: &mut HeaderMap<HeaderValue>) { #[allow(clippy::single_match)] match self { - Error::ApiError(e) => e.add_headers(header_map), + Error::ApiError(e) => e.add_http_headers(header_map), _ => (), } } |