diff options
Diffstat (limited to 'src/web')
-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(_) => { |