mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 18:17:13 +08:00 
			
		
		
		
	refactor(errors): remove RedisErrorExt (#1389)
This commit is contained in:
		 Abhishek Marrivagu
					Abhishek Marrivagu
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							8fffc161ea
						
					
				
				
					commit
					5d515050cf
				
			| @ -192,19 +192,3 @@ impl<T> ConnectorErrorExt<T> for error_stack::Result<T, errors::ConnectorError> | |||||||
|         }) |         }) | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
| pub trait RedisErrorExt { |  | ||||||
|     #[track_caller] |  | ||||||
|     fn to_redis_failed_response(self, key: &str) -> error_stack::Report<errors::StorageError>; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| impl RedisErrorExt for error_stack::Report<errors::RedisError> { |  | ||||||
|     fn to_redis_failed_response(self, key: &str) -> error_stack::Report<errors::StorageError> { |  | ||||||
|         match self.current_context() { |  | ||||||
|             errors::RedisError::NotFound => self.change_context( |  | ||||||
|                 errors::StorageError::ValueNotFound(format!("Data does not exist for key {key}",)), |  | ||||||
|             ), |  | ||||||
|             _ => self.change_context(errors::StorageError::KVError), |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
| } |  | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user