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