diff options
author | Alex Auvolat <alex@adnab.me> | 2022-12-13 16:16:49 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-12-13 16:18:01 +0100 |
commit | d1279e04f3550eae2eb5e0f25efbdf69b42fbeb9 (patch) | |
tree | 4245a4883315e64456fb27518880c587afa15298 /src/garage | |
parent | 041b60ed1dc48563ad297a6a30230655555c9a20 (diff) | |
download | garage-cli-improvements.tar.gz garage-cli-improvements.zip |
Fix error messagescli-improvements
Diffstat (limited to 'src/garage')
-rw-r--r-- | src/garage/admin.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/garage/admin.rs b/src/garage/admin.rs index ebb313d7..1ca3698a 100644 --- a/src/garage/admin.rs +++ b/src/garage/admin.rs @@ -1005,10 +1005,9 @@ impl AdminRpcHandler { BlockOperation::RetryNow { all, blocks } => { if *all { if !blocks.is_empty() { - return Err(GarageError::Message( + return Err(Error::BadRequest( "--all was specified, cannot also specify blocks".into(), - ) - .into()); + )); } let blocks = self.garage.block_manager.list_resync_errors()?; for b in blocks.iter() { @@ -1032,10 +1031,9 @@ impl AdminRpcHandler { } BlockOperation::Purge { yes, blocks } => { if !yes { - return Err(GarageError::Message( + return Err(Error::BadRequest( "Pass the --yes flag to confirm block purge operation.".into(), - ) - .into()); + )); } let mut obj_dels = 0; |