diff options
author | Alex Auvolat <alex@adnab.me> | 2022-05-12 17:10:25 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-05-12 17:10:25 +0200 |
commit | e7ddba53e38195744fd3bac29eda35fca87ab095 (patch) | |
tree | 95736058a12f681e266d4b689ec870ade094d98d /src/model/helper/key.rs | |
parent | ed768935815851a7e4b8880f0cb8fc91e35e3027 (diff) | |
download | garage-e7ddba53e38195744fd3bac29eda35fca87ab095.tar.gz garage-e7ddba53e38195744fd3bac29eda35fca87ab095.zip |
Slightly more detailed error reporting from helper
Diffstat (limited to 'src/model/helper/key.rs')
-rw-r--r-- | src/model/helper/key.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/model/helper/key.rs b/src/model/helper/key.rs index eea37f79..c1a8e974 100644 --- a/src/model/helper/key.rs +++ b/src/model/helper/key.rs @@ -34,7 +34,7 @@ impl<'a> KeyHelper<'a> { .get(&EmptyKey, key_id) .await? .filter(|b| !b.state.is_deleted()) - .ok_or_bad_request(format!("Key {} does not exist or has been deleted", key_id)) + .ok_or_else(|| Error::NoSuchAccessKey(key_id.to_string())) } /// Returns a Key if it is present in key table, |