mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 17:19:15 +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:
@ -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