mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 17:19:15 +08:00
fix: empty payment attempts on payment retrieve (#3447)
This commit is contained in:
@ -131,7 +131,16 @@ where
|
||||
}
|
||||
|
||||
KvOperation::Scan(pattern) => {
|
||||
let result: Vec<T> = redis_conn.hscan_and_deserialize(key, pattern, None).await?;
|
||||
let result: Vec<T> = redis_conn
|
||||
.hscan_and_deserialize(key, pattern, None)
|
||||
.await
|
||||
.and_then(|result| {
|
||||
if result.is_empty() {
|
||||
Err(RedisError::NotFound).into_report()
|
||||
} else {
|
||||
Ok(result)
|
||||
}
|
||||
})?;
|
||||
Ok(KvResult::Scan(result))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user