diff options
author | Quentin <quentin@deuxfleurs.fr> | 2020-11-21 18:14:02 +0100 |
---|---|---|
committer | Quentin <quentin@deuxfleurs.fr> | 2020-11-21 18:14:02 +0100 |
commit | fb18f5e17a34830d094fc591ee1d8accde2a85ad (patch) | |
tree | 68b9e14b0f158ef3625e79a00698d9a33ff01a03 | |
parent | 28efe341cbb4d96b5f81f5fe756f1a0995461e77 (diff) | |
download | garage-fb18f5e17a34830d094fc591ee1d8accde2a85ad.tar.gz garage-fb18f5e17a34830d094fc591ee1d8accde2a85ad.zip |
Fix wrong http status code
-rw-r--r-- | src/web/error.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/web/error.rs b/src/web/error.rs index 59810f0f..220bacfe 100644 --- a/src/web/error.rs +++ b/src/web/error.rs @@ -43,6 +43,7 @@ impl Error { pub fn http_status_code(&self) -> StatusCode { match self { Error::NotFound => StatusCode::NOT_FOUND, + Error::ApiError(e) => e.http_status_code(), Error::Forbidden(_) => StatusCode::FORBIDDEN, Error::InternalError(GarageError::RPC(_)) => StatusCode::SERVICE_UNAVAILABLE, Error::InternalError(_) | Error::Hyper(_) | Error::HTTP(_) => { |