aboutsummaryrefslogtreecommitdiff
path: root/src/api/common_error.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-11-15 13:07:42 +0100
committerAlex Auvolat <alex@adnab.me>2023-11-15 13:07:42 +0100
commitacd49de9f97bd27409232691262bd5827983388d (patch)
tree2cf94185f5bf6c720ca3cb0eee827d165e2b7daa /src/api/common_error.rs
parent46007bf01dd2e5b489d145ca0a5499ffa7257b96 (diff)
downloadgarage-acd49de9f97bd27409232691262bd5827983388d.tar.gz
garage-acd49de9f97bd27409232691262bd5827983388d.zip
rpc: fix write set quorums
Diffstat (limited to 'src/api/common_error.rs')
-rw-r--r--src/api/common_error.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/api/common_error.rs b/src/api/common_error.rs
index 20f9f266..ecb22fd8 100644
--- a/src/api/common_error.rs
+++ b/src/api/common_error.rs
@@ -53,9 +53,7 @@ impl CommonError {
pub fn http_status_code(&self) -> StatusCode {
match self {
CommonError::InternalError(
- GarageError::Timeout
- | GarageError::RemoteError(_)
- | GarageError::Quorum(_, _, _, _),
+ GarageError::Timeout | GarageError::RemoteError(_) | GarageError::Quorum(..),
) => StatusCode::SERVICE_UNAVAILABLE,
CommonError::InternalError(_) | CommonError::Hyper(_) | CommonError::Http(_) => {
StatusCode::INTERNAL_SERVER_ERROR
@@ -72,9 +70,7 @@ impl CommonError {
match self {
CommonError::Forbidden(_) => "AccessDenied",
CommonError::InternalError(
- GarageError::Timeout
- | GarageError::RemoteError(_)
- | GarageError::Quorum(_, _, _, _),
+ GarageError::Timeout | GarageError::RemoteError(_) | GarageError::Quorum(..),
) => "ServiceUnavailable",
CommonError::InternalError(_) | CommonError::Hyper(_) | CommonError::Http(_) => {
"InternalError"