diff options
author | Alex Auvolat <alex@adnab.me> | 2022-12-13 15:46:04 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-12-13 15:46:04 +0100 |
commit | f8d5409894d09903588cf3e9ae5ab64aab55d749 (patch) | |
tree | 37c7da030cb1b67c54c9f5dadfb515c60810204f | |
parent | d6040e32a610a792d1e5365a7643eb99fbb5a217 (diff) | |
download | garage-f8d5409894d09903588cf3e9ae5ab64aab55d749.tar.gz garage-f8d5409894d09903588cf3e9ae5ab64aab55d749.zip |
cli: more info displayed on error in garage stats
-rw-r--r-- | src/garage/admin.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/garage/admin.rs b/src/garage/admin.rs index a19b0580..ebb313d7 100644 --- a/src/garage/admin.rs +++ b/src/garage/admin.rs @@ -785,11 +785,12 @@ impl AdminRpcHandler { match self .endpoint .call(&node_id, AdminRpc::Stats(opt), PRIO_NORMAL) - .await? + .await { - Ok(AdminRpc::Ok(s)) => writeln!(&mut ret, "{}", s).unwrap(), - Ok(x) => writeln!(&mut ret, "Bad answer: {:?}", x).unwrap(), - Err(e) => writeln!(&mut ret, "Error: {}", e).unwrap(), + Ok(Ok(AdminRpc::Ok(s))) => writeln!(&mut ret, "{}", s).unwrap(), + Ok(Ok(x)) => writeln!(&mut ret, "Bad answer: {:?}", x).unwrap(), + Ok(Err(e)) => writeln!(&mut ret, "Remote error: {}", e).unwrap(), + Err(e) => writeln!(&mut ret, "Network error: {}", e).unwrap(), } } Ok(AdminRpc::Ok(ret)) |