diff --git a/src/garage/admin/mod.rs b/src/garage/admin/mod.rs index e2468143..ab530ebf 100644 --- a/src/garage/admin/mod.rs +++ b/src/garage/admin/mod.rs @@ -482,7 +482,7 @@ impl AdminRpcHandler { AdminRpc::MetaOperation(MetaOperation::Snapshot { all: false }), PRIO_NORMAL, ) - .await + .await? })) .await; @@ -495,7 +495,14 @@ impl AdminRpcHandler { ret.push(format!("{:?}\t{}", to, res_str)); } - Ok(AdminRpc::Ok(format_table_to_string(ret))) + if resps.iter().any(|resp| match resp { + Err(_) => true, + Ok(_) => false, + }) { + Err(Error::BadRequest(format_table_to_string(ret)).into()) + } else { + Ok(AdminRpc::Ok(format_table_to_string(ret))) + } } MetaOperation::Snapshot { all: false } => { garage_model::snapshot::async_snapshot_metadata(&self.garage).await?;