diff --git a/crates/router/src/core/errors/utils.rs b/crates/router/src/core/errors/utils.rs index 8389beeeeb..b05dd25b15 100644 --- a/crates/router/src/core/errors/utils.rs +++ b/crates/router/src/core/errors/utils.rs @@ -1,11 +1,13 @@ use crate::{core::errors, logger}; pub trait StorageErrorExt { + #[track_caller] fn to_not_found_response( self, not_found_response: errors::ApiErrorResponse, ) -> error_stack::Report; + #[track_caller] fn to_duplicate_response( self, duplicate_response: errors::ApiErrorResponse, @@ -41,8 +43,11 @@ impl StorageErrorExt for error_stack::Report { } pub trait ConnectorErrorExt { + #[track_caller] fn to_refund_failed_response(self) -> error_stack::Report; + #[track_caller] fn to_payment_failed_response(self) -> error_stack::Report; + #[track_caller] fn to_verify_failed_response(self) -> error_stack::Report; } @@ -121,6 +126,7 @@ impl ConnectorErrorExt for error_stack::Report { } pub trait RedisErrorExt { + #[track_caller] fn to_redis_failed_response(self, key: &str) -> error_stack::Report; }