From 1d216db5ceeac3dc61d672de89a921501dcaee45 Mon Sep 17 00:00:00 2001 From: Sai Harsha Vardhan <56996463+sai-harsha-vardhan@users.noreply.github.com> Date: Tue, 20 Jun 2023 14:53:50 +0530 Subject: [PATCH] fix(connector): [Trustpay] add reason to all the error responses (#1482) --- crates/router/src/connector/trustpay.rs | 14 +++++---- .../src/connector/trustpay/transformers.rs | 29 ++++++++++++------- 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/crates/router/src/connector/trustpay.rs b/crates/router/src/connector/trustpay.rs index 93fad702a1..d89a7a4f07 100644 --- a/crates/router/src/connector/trustpay.rs +++ b/crates/router/src/connector/trustpay.rs @@ -113,7 +113,7 @@ impl ConnectorCommon for Trustpay { status_code: res.status_code, code: response.status.to_string(), message: format!("{:?}", response.errors.first().unwrap_or(&default_error)), - reason: None, + reason: Some(format!("{:?}", response.errors)), }) } } @@ -242,8 +242,12 @@ impl ConnectorIntegration TryFrom