diff options
author | Alex Auvolat <alex@adnab.me> | 2021-03-15 22:36:41 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-03-15 22:36:41 +0100 |
commit | 0cd5b2ae19965b8c1f3176afeb8f678c4d8366dd (patch) | |
tree | a3f57c18da5377a618c38f3e4bba002c9eed1358 /src/util/error.rs | |
parent | 4d4117f2b4eb69b63e2329f6e0b8929e6a8b5b31 (diff) | |
download | garage-0cd5b2ae19965b8c1f3176afeb8f678c4d8366dd.tar.gz garage-0cd5b2ae19965b8c1f3176afeb8f678c4d8366dd.zip |
WIP migrate to tokio 1
Diffstat (limited to 'src/util/error.rs')
-rw-r--r-- | src/util/error.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/util/error.rs b/src/util/error.rs index dbf71ac1..a9bf0824 100644 --- a/src/util/error.rs +++ b/src/util/error.rs @@ -8,16 +8,22 @@ use crate::data::*; pub enum RPCError { #[error(display = "Node is down: {:?}.", _0)] NodeDown(UUID), + #[error(display = "Timeout: {}", _0)] - Timeout(#[error(source)] tokio::time::Elapsed), + Timeout(#[error(source)] tokio::time::error::Elapsed), + #[error(display = "HTTP error: {}", _0)] HTTP(#[error(source)] http::Error), + #[error(display = "Hyper error: {}", _0)] Hyper(#[error(source)] hyper::Error), + #[error(display = "Messagepack encode error: {}", _0)] RMPEncode(#[error(source)] rmp_serde::encode::Error), + #[error(display = "Messagepack decode error: {}", _0)] RMPDecode(#[error(source)] rmp_serde::decode::Error), + #[error(display = "Too many errors: {:?}", _0)] TooManyErrors(Vec<String>), } |