mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 19:46:48 +08:00
fix(errors): use Debug impl instead of Display for error types wrapping error_stack::Report (#714)
This commit is contained in:
34
Cargo.lock
generated
34
Cargo.lock
generated
@ -305,9 +305,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "anyhow"
|
name = "anyhow"
|
||||||
version = "1.0.68"
|
version = "1.0.69"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61"
|
checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "api_models"
|
name = "api_models"
|
||||||
@ -1482,12 +1482,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "error-stack"
|
name = "error-stack"
|
||||||
version = "0.2.4"
|
version = "0.3.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "859d224e04b2d93d974c08e375dac9b8d1a513846e44c6666450a57b1ed963f9"
|
checksum = "5f00447f331c7f726db5b8532ebc9163519eed03c6d7c8b73c90b3ff5646ac85"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"owo-colors",
|
|
||||||
"rustc_version",
|
"rustc_version",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -2098,12 +2097,6 @@ version = "2.7.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146"
|
checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "is_ci"
|
|
||||||
version = "1.1.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "616cde7c720bb2bb5824a224687d8f77bfd38922027f01d825cd7453be5099fb"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "itertools"
|
name = "itertools"
|
||||||
version = "0.10.5"
|
version = "0.10.5"
|
||||||
@ -2664,15 +2657,6 @@ version = "0.1.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
|
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "owo-colors"
|
|
||||||
version = "3.5.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f"
|
|
||||||
dependencies = [
|
|
||||||
"supports-color",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "parking"
|
name = "parking"
|
||||||
version = "2.0.0"
|
version = "2.0.0"
|
||||||
@ -3846,16 +3830,6 @@ version = "2.4.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
|
checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "supports-color"
|
|
||||||
version = "1.3.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "8ba6faf2ca7ee42fdd458f4347ae0a9bd6bcc445ad7cb57ad82b383f18870d6f"
|
|
||||||
dependencies = [
|
|
||||||
"atty",
|
|
||||||
"is_ci",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "1.0.107"
|
version = "1.0.107"
|
||||||
|
|||||||
@ -7,7 +7,7 @@ edition = "2021"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix-web = "4.3.0"
|
actix-web = "4.3.0"
|
||||||
error-stack = "0.2.4"
|
error-stack = "0.3.1"
|
||||||
frunk = "0.4.1"
|
frunk = "0.4.1"
|
||||||
frunk_core = "0.4.1"
|
frunk_core = "0.4.1"
|
||||||
mime = "0.3.16"
|
mime = "0.3.16"
|
||||||
|
|||||||
@ -10,7 +10,7 @@ license = "Apache-2.0"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
async-trait = "0.1.63"
|
async-trait = "0.1.63"
|
||||||
bytes = "1.3.0"
|
bytes = "1.3.0"
|
||||||
error-stack = "0.2.4"
|
error-stack = "0.3.1"
|
||||||
futures = "0.3.25"
|
futures = "0.3.25"
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
nanoid = "0.4.0"
|
nanoid = "0.4.0"
|
||||||
|
|||||||
@ -13,7 +13,7 @@ bb8 = "0.8"
|
|||||||
clap = { version = "4.1.4", default-features = false, features = ["std", "derive", "help", "usage"] }
|
clap = { version = "4.1.4", default-features = false, features = ["std", "derive", "help", "usage"] }
|
||||||
config = { version = "0.13.3", features = ["toml"] }
|
config = { version = "0.13.3", features = ["toml"] }
|
||||||
diesel = { version = "2.0.3", features = ["postgres", "serde_json", "time", "64-column-tables"] }
|
diesel = { version = "2.0.3", features = ["postgres", "serde_json", "time", "64-column-tables"] }
|
||||||
error-stack = "0.2.4"
|
error-stack = "0.3.1"
|
||||||
once_cell = "1.17.0"
|
once_cell = "1.17.0"
|
||||||
serde = "1.0.152"
|
serde = "1.0.152"
|
||||||
serde_json = "1.0.91"
|
serde_json = "1.0.91"
|
||||||
|
|||||||
@ -5,7 +5,7 @@ use thiserror::Error;
|
|||||||
pub enum DrainerError {
|
pub enum DrainerError {
|
||||||
#[error("Error in parsing config : {0}")]
|
#[error("Error in parsing config : {0}")]
|
||||||
ConfigParsingError(String),
|
ConfigParsingError(String),
|
||||||
#[error("Error during redis operation : {0}")]
|
#[error("Error during redis operation : {0:?}")]
|
||||||
RedisError(error_stack::Report<redis::errors::RedisError>),
|
RedisError(error_stack::Report<redis::errors::RedisError>),
|
||||||
#[error("Application configuration error: {0}")]
|
#[error("Application configuration error: {0}")]
|
||||||
ConfigurationError(config::ConfigError),
|
ConfigurationError(config::ConfigError),
|
||||||
|
|||||||
@ -9,7 +9,7 @@ license = "Apache-2.0"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
async-trait = "0.1.63"
|
async-trait = "0.1.63"
|
||||||
error-stack = "0.2.4"
|
error-stack = "0.3.1"
|
||||||
fred = { version = "5.2.0", features = ["metrics", "partial-tracing"] }
|
fred = { version = "5.2.0", features = ["metrics", "partial-tracing"] }
|
||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
serde = { version = "1.0.152", features = ["derive"] }
|
serde = { version = "1.0.152", features = ["derive"] }
|
||||||
|
|||||||
@ -42,7 +42,7 @@ crc32fast = "1.3.2"
|
|||||||
diesel = { version = "2.0.3", features = ["postgres", "serde_json", "time", "64-column-tables"] }
|
diesel = { version = "2.0.3", features = ["postgres", "serde_json", "time", "64-column-tables"] }
|
||||||
dyn-clone = "1.0.10"
|
dyn-clone = "1.0.10"
|
||||||
encoding_rs = "0.8.31"
|
encoding_rs = "0.8.31"
|
||||||
error-stack = "0.2.4"
|
error-stack = "0.3.1"
|
||||||
frunk = "0.4.1"
|
frunk = "0.4.1"
|
||||||
frunk_core = "0.4.1"
|
frunk_core = "0.4.1"
|
||||||
futures = "0.3.25"
|
futures = "0.3.25"
|
||||||
|
|||||||
@ -50,7 +50,7 @@ macro_rules! impl_error_type {
|
|||||||
|
|
||||||
#[derive(Debug, thiserror::Error)]
|
#[derive(Debug, thiserror::Error)]
|
||||||
pub enum StorageError {
|
pub enum StorageError {
|
||||||
#[error("DatabaseError: {0}")]
|
#[error("DatabaseError: {0:?}")]
|
||||||
DatabaseError(error_stack::Report<storage_errors::DatabaseError>),
|
DatabaseError(error_stack::Report<storage_errors::DatabaseError>),
|
||||||
#[error("ValueNotFound: {0}")]
|
#[error("ValueNotFound: {0}")]
|
||||||
ValueNotFound(String),
|
ValueNotFound(String),
|
||||||
@ -71,13 +71,13 @@ pub enum StorageError {
|
|||||||
CustomerRedacted,
|
CustomerRedacted,
|
||||||
#[error("Deserialization failure")]
|
#[error("Deserialization failure")]
|
||||||
DeserializationFailed,
|
DeserializationFailed,
|
||||||
#[error("Received Error RedisError: {0}")]
|
#[error("RedisError: {0:?}")]
|
||||||
ERedisError(error_stack::Report<RedisError>),
|
RedisError(error_stack::Report<RedisError>),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<error_stack::Report<RedisError>> for StorageError {
|
impl From<error_stack::Report<RedisError>> for StorageError {
|
||||||
fn from(err: error_stack::Report<RedisError>) -> Self {
|
fn from(err: error_stack::Report<RedisError>) -> Self {
|
||||||
Self::ERedisError(err)
|
Self::RedisError(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -13,7 +13,7 @@ kv_store = []
|
|||||||
async-bb8-diesel = { git = "https://github.com/juspay/async-bb8-diesel", rev = "9a71d142726dbc33f41c1fd935ddaa79841c7be5" }
|
async-bb8-diesel = { git = "https://github.com/juspay/async-bb8-diesel", rev = "9a71d142726dbc33f41c1fd935ddaa79841c7be5" }
|
||||||
async-trait = "0.1.63"
|
async-trait = "0.1.63"
|
||||||
diesel = { version = "2.0.3", features = ["postgres", "serde_json", "time", "64-column-tables"] }
|
diesel = { version = "2.0.3", features = ["postgres", "serde_json", "time", "64-column-tables"] }
|
||||||
error-stack = "0.2.4"
|
error-stack = "0.3.1"
|
||||||
frunk = "0.4.1"
|
frunk = "0.4.1"
|
||||||
frunk_core = "0.4.1"
|
frunk_core = "0.4.1"
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
|
|||||||
Reference in New Issue
Block a user