mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 18:17:13 +08:00 
			
		
		
		
	fix: throw bad request while pushing duplicate data to redis (#3016)
This commit is contained in:
		| @ -1,4 +1,7 @@ | ||||
| use crate::{core::errors, routes::metrics}; | ||||
| use crate::{ | ||||
|     core::errors::{self, utils::RedisErrorExt}, | ||||
|     routes::metrics, | ||||
| }; | ||||
|  | ||||
| /// Generates hscan field pattern. Suppose the field is pa_1234_ref_1211 it will generate | ||||
| /// pa_1234_ref_* | ||||
| @ -28,7 +31,8 @@ where | ||||
|                 metrics::KV_MISS.add(&metrics::CONTEXT, 1, &[]); | ||||
|                 database_call_closure().await | ||||
|             } | ||||
|             _ => Err(redis_error.change_context(errors::StorageError::KVError)), | ||||
|             // Keeping the key empty here since the error would never go here. | ||||
|             _ => Err(redis_error.to_redis_failed_response("")), | ||||
|         }, | ||||
|     } | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Kartikeya Hegde
					Kartikeya Hegde