aboutsummaryrefslogtreecommitdiff
path: root/src/api/error.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-10-21 17:29:27 +0200
committerAlex Auvolat <alex@adnab.me>2021-10-21 17:29:27 +0200
commitbff5333c622ce5c8c3a151b4bd2d7ad2d04004c2 (patch)
tree526f8a96612c6bc8b69344db6e60aa861e006932 /src/api/error.rs
parentb7eccf52640b91c7243748e46506b88d0f1ceaef (diff)
downloadgarage-bff5333c622ce5c8c3a151b4bd2d7ad2d04004c2.tar.gz
garage-bff5333c622ce5c8c3a151b4bd2d7ad2d04004c2.zip
Move things around, improvements to CLI
Diffstat (limited to 'src/api/error.rs')
-rw-r--r--src/api/error.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/error.rs b/src/api/error.rs
index 35fa404f..31ba7230 100644
--- a/src/api/error.rs
+++ b/src/api/error.rs
@@ -83,7 +83,7 @@ impl Error {
Error::NotFound => StatusCode::NOT_FOUND,
Error::Forbidden(_) => StatusCode::FORBIDDEN,
Error::InternalError(
- GarageError::Timeout | GarageError::RemoteError(_) | GarageError::TooManyErrors(_),
+ GarageError::Timeout | GarageError::RemoteError(_) | GarageError::Quorum(_, _, _),
) => StatusCode::SERVICE_UNAVAILABLE,
Error::InternalError(_) | Error::Hyper(_) | Error::Http(_) => {
StatusCode::INTERNAL_SERVER_ERROR
@@ -98,7 +98,7 @@ impl Error {
Error::Forbidden(_) => "AccessDenied",
Error::AuthorizationHeaderMalformed(_) => "AuthorizationHeaderMalformed",
Error::InternalError(
- GarageError::Timeout | GarageError::RemoteError(_) | GarageError::TooManyErrors(_),
+ GarageError::Timeout | GarageError::RemoteError(_) | GarageError::Quorum(_, _, _),
) => "ServiceUnavailable",
Error::InternalError(_) | Error::Hyper(_) | Error::Http(_) => "InternalError",
_ => "InvalidRequest",