mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 19:46:48 +08:00
fix: add fallback to reverselookup error (#3025)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -17,6 +17,7 @@ api_models = { version = "0.1.0", path = "../api_models" }
|
||||
common_enums = { version = "0.1.0", path = "../common_enums" }
|
||||
common_utils = { version = "0.1.0", path = "../common_utils" }
|
||||
masking = { version = "0.1.0", path = "../masking" }
|
||||
diesel_models = { version = "0.1.0", path = "../diesel_models", features = ["kv_store"] }
|
||||
|
||||
# Third party deps
|
||||
async-trait = "0.1.68"
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
use diesel_models::errors::DatabaseError;
|
||||
|
||||
pub type StorageResult<T> = error_stack::Result<T, StorageError>;
|
||||
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
@ -6,7 +8,7 @@ pub enum StorageError {
|
||||
InitializationError,
|
||||
// TODO: deprecate this error type to use a domain error instead
|
||||
#[error("DatabaseError: {0:?}")]
|
||||
DatabaseError(String),
|
||||
DatabaseError(error_stack::Report<DatabaseError>),
|
||||
#[error("ValueNotFound: {0}")]
|
||||
ValueNotFound(String),
|
||||
#[error("DuplicateValue: {entity} already exists {key:?}")]
|
||||
|
||||
Reference in New Issue
Block a user