mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 10:06:32 +08:00 
			
		
		
		
	feat(storage_impl): split payment intent interface implementation (#1946)
This commit is contained in:
		
							
								
								
									
										32
									
								
								crates/data_models/src/errors.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								crates/data_models/src/errors.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,32 @@ | ||||
| #[derive(Debug, thiserror::Error)] | ||||
| pub enum StorageError { | ||||
|     // TODO: deprecate this error type to use a domain error instead | ||||
|     #[error("DatabaseError: {0:?}")] | ||||
|     DatabaseError(String), | ||||
|     #[error("ValueNotFound: {0}")] | ||||
|     ValueNotFound(String), | ||||
|     #[error("DuplicateValue: {entity} already exists {key:?}")] | ||||
|     DuplicateValue { | ||||
|         entity: &'static str, | ||||
|         key: Option<String>, | ||||
|     }, | ||||
|     #[error("Timed out while trying to connect to the database")] | ||||
|     DatabaseConnectionError, | ||||
|     #[error("KV error")] | ||||
|     KVError, | ||||
|     #[error("Serialization failure")] | ||||
|     SerializationFailed, | ||||
|     #[error("MockDb error")] | ||||
|     MockDbError, | ||||
|     #[error("Customer with this id is Redacted")] | ||||
|     CustomerRedacted, | ||||
|     #[error("Deserialization failure")] | ||||
|     DeserializationFailed, | ||||
|     #[error("Error while encrypting data")] | ||||
|     EncryptionError, | ||||
|     #[error("Error while decrypting data from database")] | ||||
|     DecryptionError, | ||||
|     // TODO: deprecate this error type to use a domain error instead | ||||
|     #[error("RedisError: {0:?}")] | ||||
|     RedisError(String), | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Sampras Lopes
					Sampras Lopes