mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 19:46:48 +08:00
fix: kv logs when KeyNotSet is returned (#2928)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
use std::{fmt::Debug, sync::Arc};
|
||||
|
||||
use common_utils::errors::CustomResult;
|
||||
use error_stack::IntoReport;
|
||||
use redis_interface::errors::RedisError;
|
||||
use router_derive::TryGetEnumVariant;
|
||||
use router_env::logger;
|
||||
@ -145,8 +146,10 @@ where
|
||||
store
|
||||
.push_to_drainer_stream::<S>(sql, partition_key)
|
||||
.await?;
|
||||
Ok(KvResult::HSetNx(result))
|
||||
} else {
|
||||
Err(RedisError::SetNxFailed).into_report()
|
||||
}
|
||||
Ok(KvResult::HSetNx(result))
|
||||
}
|
||||
|
||||
KvOperation::SetNx(value, sql) => {
|
||||
@ -160,9 +163,10 @@ where
|
||||
store
|
||||
.push_to_drainer_stream::<S>(sql, partition_key)
|
||||
.await?;
|
||||
Ok(KvResult::SetNx(result))
|
||||
} else {
|
||||
Err(RedisError::SetNxFailed).into_report()
|
||||
}
|
||||
|
||||
Ok(KvResult::SetNx(result))
|
||||
}
|
||||
|
||||
KvOperation::Get => {
|
||||
|
||||
Reference in New Issue
Block a user