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(core): Update error for routing instead of Internal Server Error (#8512)

Prasunna Soppae4b1d45be76f
diff --git a/crates/router/src/core/payments.rs b/crates/router/src/core/payments.rs
index 66334148b0..63a4942d34 100644
--- a/crates/router/src/core/payments.rs
+++ b/crates/router/src/core/payments.rs
@@ -8048,8 +8048,7 @@ pub async fn route_connector_v2_for_payments(
conn.merchant_connector_id.clone(),
)
})
- .ok_or(errors::ApiErrorResponse::InternalServerError)
- .attach_printable("Invalid connector name received")?
+ .ok_or(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)?
.map(|connector_data| ConnectorCallType::PreDetermined(connector_data.into()))
}