mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 04:04:55 +08:00
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:
@ -139,6 +139,7 @@ impl StorageError {
|
|||||||
pub fn is_db_not_found(&self) -> bool {
|
pub fn is_db_not_found(&self) -> bool {
|
||||||
match self {
|
match self {
|
||||||
Self::DatabaseError(err) => matches!(err.current_context(), DatabaseError::NotFound),
|
Self::DatabaseError(err) => matches!(err.current_context(), DatabaseError::NotFound),
|
||||||
|
Self::ValueNotFound(_) => true,
|
||||||
_ => false,
|
_ => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user