diff options
author | Alex Auvolat <alex@adnab.me> | 2021-10-21 17:41:21 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-10-21 17:43:42 +0200 |
commit | dbe457d3fa2b2d83e57ffdd55a18046688494de0 (patch) | |
tree | b97e07f1d3ef5e046d3334bd135740ad6b9c5268 /src/api | |
parent | bff5333c622ce5c8c3a151b4bd2d7ad2d04004c2 (diff) | |
download | garage-dbe457d3fa2b2d83e57ffdd55a18046688494de0.tar.gz garage-dbe457d3fa2b2d83e57ffdd55a18046688494de0.zip |
Improve clarity0.4-alpha
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/error.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/api/error.rs b/src/api/error.rs index 31ba7230..a57f926b 100644 --- a/src/api/error.rs +++ b/src/api/error.rs @@ -83,7 +83,9 @@ impl Error { Error::NotFound => StatusCode::NOT_FOUND, Error::Forbidden(_) => StatusCode::FORBIDDEN, Error::InternalError( - GarageError::Timeout | GarageError::RemoteError(_) | GarageError::Quorum(_, _, _), + GarageError::Timeout + | GarageError::RemoteError(_) + | GarageError::Quorum(_, _, _, _), ) => StatusCode::SERVICE_UNAVAILABLE, Error::InternalError(_) | Error::Hyper(_) | Error::Http(_) => { StatusCode::INTERNAL_SERVER_ERROR @@ -98,7 +100,9 @@ impl Error { Error::Forbidden(_) => "AccessDenied", Error::AuthorizationHeaderMalformed(_) => "AuthorizationHeaderMalformed", Error::InternalError( - GarageError::Timeout | GarageError::RemoteError(_) | GarageError::Quorum(_, _, _), + GarageError::Timeout + | GarageError::RemoteError(_) + | GarageError::Quorum(_, _, _, _), ) => "ServiceUnavailable", Error::InternalError(_) | Error::Hyper(_) | Error::Http(_) => "InternalError", _ => "InvalidRequest", |