diff options
author | Alex Auvolat <alex@adnab.me> | 2020-04-23 16:05:43 +0000 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-04-23 16:06:11 +0000 |
commit | 82f4cd87195e61552348ae9d1cd27096253a4187 (patch) | |
tree | 09e150420a8071e1381b72847a692e720428f1e5 /src/error.rs | |
parent | 2fe82be3bcb326af04c4c862431237c576ed1152 (diff) | |
download | garage-82f4cd87195e61552348ae9d1cd27096253a4187.tar.gz garage-82f4cd87195e61552348ae9d1cd27096253a4187.zip |
Continue pinging nodes when they are down ; overall better handling of down nodes
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/error.rs b/src/error.rs index 50a0a44b..d0a46f39 100644 --- a/src/error.rs +++ b/src/error.rs @@ -3,6 +3,7 @@ use hyper::StatusCode; use std::io; use crate::data::Hash; +use crate::rpc_client::RPCError; #[derive(Debug, Error)] pub enum Error { @@ -33,7 +34,6 @@ pub enum Error { RMPDecode(#[error(source)] rmp_serde::decode::Error), #[error(display = "JSON error: {}", _0)] JSON(#[error(source)] serde_json::error::Error), - #[error(display = "TOML decode error: {}", _0)] TomlDecode(#[error(source)] toml::de::Error), @@ -43,8 +43,11 @@ pub enum Error { #[error(display = "Tokio join error: {}", _0)] TokioJoin(#[error(source)] tokio::task::JoinError), - #[error(display = "RPC error: {} (status code {})", _0, _1)] - RPCError(String, StatusCode), + #[error(display = "RPC call error: {}", _0)] + RPC(#[error(source)] RPCError), + + #[error(display = "Remote error: {} (status code {})", _0, _1)] + RemoteError(String, StatusCode), #[error(display = "Bad request: {}", _0)] BadRequest(String), |