From d9c7849dfa773f9c4181def50c26e35c45a76d54 Mon Sep 17 00:00:00 2001 From: Prajjwal Kumar Date: Tue, 9 Jul 2024 16:26:06 +0530 Subject: [PATCH] refactor(core): removal of deserialization logs for routing_metadata (#5253) Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> --- crates/router/src/core/payments/routing.rs | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/crates/router/src/core/payments/routing.rs b/crates/router/src/core/payments/routing.rs index 8c27e3b3cac9..d1a5441d958e 100644 --- a/crates/router/src/core/payments/routing.rs +++ b/crates/router/src/core/payments/routing.rs @@ -115,10 +115,7 @@ pub fn make_dsl_input_for_payouts( .transpose() .change_context(errors::RoutingError::MetadataParsingError) .attach_printable("Unable to parse routing_parameters from metadata of payouts") - .unwrap_or_else(|err| { - logger::error!(error=?err); - None - }); + .unwrap_or(None); let payment = dsl_inputs::PaymentInput { amount: payout_data.payouts.amount, card_bin: None, @@ -249,10 +246,7 @@ where .transpose() .change_context(errors::RoutingError::MetadataParsingError) .attach_printable("Unable to parse routing_parameters from metadata of payment_intent") - .unwrap_or_else(|err| { - logger::error!(error=?err); - None - }); + .unwrap_or(None); Ok(dsl_inputs::BackendInput { metadata, @@ -937,10 +931,7 @@ pub async fn perform_session_flow_routing( .transpose() .change_context(errors::RoutingError::MetadataParsingError) .attach_printable("Unable to parse routing_parameters from metadata of payment_intent") - .unwrap_or_else(|err| { - logger::error!(?err); - None - }); + .unwrap_or(None); let mut backend_input = dsl_inputs::BackendInput { metadata, @@ -1166,10 +1157,7 @@ pub fn make_dsl_input_for_surcharge( .transpose() .change_context(errors::RoutingError::MetadataParsingError) .attach_printable("Unable to parse routing_parameters from metadata of payment_intent") - .unwrap_or_else(|err| { - logger::error!(error=?err); - None - }); + .unwrap_or(None); let payment_method_input = dsl_inputs::PaymentMethodInput { payment_method: None, payment_method_type: None,