diff options
author | Alex Auvolat <alex@adnab.me> | 2020-04-19 19:08:48 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-04-19 19:08:48 +0200 |
commit | e325c7f47a9ad7777358b669f62a7c613f676ecd (patch) | |
tree | 63bde6197bbc5d2148b0e257751b7f66913bad0e /src/rpc_client.rs | |
parent | a6129d8626f5b87462b70eadbce2db08c9761cfd (diff) | |
download | garage-e325c7f47a9ad7777358b669f62a7c613f676ecd.tar.gz garage-e325c7f47a9ad7777358b669f62a7c613f676ecd.zip |
Add hostname to node info
Diffstat (limited to 'src/rpc_client.rs')
-rw-r--r-- | src/rpc_client.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/rpc_client.rs b/src/rpc_client.rs index 35debb53..b2a0cf22 100644 --- a/src/rpc_client.rs +++ b/src/rpc_client.rs @@ -231,10 +231,11 @@ impl RpcHttpClient { let status = resp.status(); let body = hyper::body::to_bytes(resp.into_body()).await?; match rmp_serde::decode::from_read::<_, Result<M, String>>(body.into_buf()) { - Err(e) => - Err(Error::RPCError(format!("Invalid reply"), status)), - Ok(Err(e)) => - Err(Error::RPCError(e, status)), + Err(e) => Err(Error::RPCError( + format!("Invalid reply (deserialize error: {})", e), + status, + )), + Ok(Err(e)) => Err(Error::RPCError(e, status)), Ok(Ok(x)) => Ok(x), } } |