mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 09:38:33 +08:00
fix(router): handle panic-prone code with proper errors (#297)
This commit is contained in:
@ -659,8 +659,8 @@ pub async fn get_connector_default(
|
|||||||
.change_context(errors::ConnectorError::RoutingRulesParsingError)
|
.change_context(errors::ConnectorError::RoutingRulesParsingError)
|
||||||
.change_context(errors::ApiErrorResponse::InternalServerError)?;
|
.change_context(errors::ApiErrorResponse::InternalServerError)?;
|
||||||
let custom_routing_rules: api::CustomRoutingRules = vec_val
|
let custom_routing_rules: api::CustomRoutingRules = vec_val
|
||||||
.first()
|
.into_iter()
|
||||||
.cloned()
|
.next()
|
||||||
.parse_value("CustomRoutingRules")
|
.parse_value("CustomRoutingRules")
|
||||||
.change_context(errors::ConnectorError::RoutingRulesParsingError)
|
.change_context(errors::ConnectorError::RoutingRulesParsingError)
|
||||||
.change_context(errors::ApiErrorResponse::InternalServerError)?;
|
.change_context(errors::ApiErrorResponse::InternalServerError)?;
|
||||||
|
|||||||
Reference in New Issue
Block a user