From 4cc668ba38acca29f00ce6213313f767c870a3da Mon Sep 17 00:00:00 2001 From: Anish Kacham Date: Thu, 7 Nov 2024 04:10:45 +0000 Subject: [PATCH] feat(events): don't take ownership of error_codes and error_message for audit events --- crates/router/src/core/payments/operations/payment_reject.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/router/src/core/payments/operations/payment_reject.rs b/crates/router/src/core/payments/operations/payment_reject.rs index 7321200a30ad..23531d2342dc 100644 --- a/crates/router/src/core/payments/operations/payment_reject.rs +++ b/crates/router/src/core/payments/operations/payment_reject.rs @@ -265,8 +265,8 @@ impl UpdateTracker, PaymentsCancelRequest> for Payme ) .await .to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?; - let error_code = payment_data.payment_attempt.error_code; - let error_message = payment_data.payment_attempt.error_message; + let error_code = payment_data.payment_attempt.error_code.clone(); + let error_message = payment_data.payment_attempt.error_message.clone(); req_state .event_context .event(AuditEvent::new(AuditEventType::PaymentReject {