feat(storage_impl): split payment intent interface implementation (#1946)

This commit is contained in:
Sampras Lopes
2023-08-21 19:23:03 +05:30
committed by GitHub
parent a0d66d5424
commit 88d65a62fc
43 changed files with 2280 additions and 690 deletions

View 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),
}