From 4df1c77b0bf612a843029c624d263da210fdf3c9 Mon Sep 17 00:00:00 2001 From: Shankar Singh C Date: Fri, 3 Jan 2025 12:36:47 +0530 Subject: [PATCH] use connector error reason if present, for the refund error response --- crates/hyperswitch_domain_models/src/relay.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/hyperswitch_domain_models/src/relay.rs b/crates/hyperswitch_domain_models/src/relay.rs index f7b1a6347ed8..969fda8d5334 100644 --- a/crates/hyperswitch_domain_models/src/relay.rs +++ b/crates/hyperswitch_domain_models/src/relay.rs @@ -79,7 +79,7 @@ impl RelayUpdate { match response { Err(error) => Self::ErrorUpdate { error_code: error.code, - error_message: error.message, + error_message: error.reason.unwrap_or(error.message), status: common_enums::RelayStatus::Failure, }, Ok(response) => Self::StatusUpdate {