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(ucs): use NO_ERROR_CODE fallback when connector error code is absent (#13095)

Amitsingh Tanwar771cfde3939a
diff --git a/crates/hyperswitch_interfaces/src/unified_connector_service/transformers.rs b/crates/hyperswitch_interfaces/src/unified_connector_service/transformers.rs
index a231864a13..dfabfb6ece 100644
--- a/crates/hyperswitch_interfaces/src/unified_connector_service/transformers.rs
+++ b/crates/hyperswitch_interfaces/src/unified_connector_service/transformers.rs
@@ -1180,7 +1180,7 @@ impl UnifiedConnectorServiceError {
.as_ref()
.and_then(|error_info| error_info.connector_details.as_ref())
.and_then(|connector_details| connector_details.code.clone())
- .unwrap_or_else(|| connector_error.error_code.clone()),
+ .unwrap_or_else(|| crate::consts::NO_ERROR_CODE.to_string()),
message: connector_error.error_message,
status_code,
reason: connector_error