Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

fix(cybersource): update error handling to use message instead of reason in response (#10224)

Ayush Anand6d7349ed4f97
diff --git a/crates/hyperswitch_connectors/src/connectors/cybersource.rs b/crates/hyperswitch_connectors/src/connectors/cybersource.rs
index 945d127d18..209f613015 100644
--- a/crates/hyperswitch_connectors/src/connectors/cybersource.rs
+++ b/crates/hyperswitch_connectors/src/connectors/cybersource.rs
@@ -205,7 +205,7 @@ impl ConnectorCommon for Cybersource {
});
(
error_info.reason.clone(),
- error_info.reason.clone(),
+ error_info.message.clone(),
transformers::get_error_reason(
Some(error_info.message.clone()),
detailed_error_info,
@@ -227,8 +227,9 @@ impl ConnectorCommon for Cybersource {
|reason| reason.to_string(),
),
response
- .reason
- .map_or(error_message.to_string(), |reason| reason.to_string()),
+ .message
+ .clone()
+ .map_or(error_message.to_string(), |msg| msg.to_string()),
transformers::get_error_reason(
response.message,
detailed_error_info,