fix(api_keys): fix internal server error being thrown when trying to update or delete non-existent API key (#3762)

This commit is contained in:
Sanchith Hegde
2024-02-22 13:06:59 +05:30
committed by GitHub
parent 53cc9db931
commit 5c24a76fbd

View File

@ -139,6 +139,7 @@ impl StorageError {
pub fn is_db_not_found(&self) -> bool {
match self {
Self::DatabaseError(err) => matches!(err.current_context(), DatabaseError::NotFound),
Self::ValueNotFound(_) => true,
_ => false,
}
}