aboutsummaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-04-23 16:23:06 +0000
committerAlex Auvolat <alex@adnab.me>2020-04-23 16:23:06 +0000
commit01a8acdeecfcacafb61809f9e135709148e842ce (patch)
treef28e39d919f4f162efb21aa0692c5b0cc6e6949a /src/error.rs
parent82f4cd87195e61552348ae9d1cd27096253a4187 (diff)
downloadgarage-01a8acdeecfcacafb61809f9e135709148e842ce.tar.gz
garage-01a8acdeecfcacafb61809f9e135709148e842ce.zip
Better error reporting
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs
index d0a46f39..e217f9ae 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -67,6 +67,7 @@ impl Error {
match self {
Error::BadRequest(_) => StatusCode::BAD_REQUEST,
Error::NotFound => StatusCode::NOT_FOUND,
+ Error::RPC(_) => StatusCode::SERVICE_UNAVAILABLE,
_ => StatusCode::INTERNAL_SERVER_ERROR,
}
}