mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 01:27:31 +08:00
refactor(pm): create new crate for payment methods (#7355)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -39,3 +39,13 @@ pub enum StorageError {
|
||||
#[error("RedisError: {0:?}")]
|
||||
RedisError(String),
|
||||
}
|
||||
|
||||
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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user