aboutsummaryrefslogtreecommitdiff
path: root/src/rpc_client.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc_client.rs')
-rw-r--r--src/rpc_client.rs9
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),
}
}