Skip to content

Commit

Permalink
feat(events): don't take ownership of error_codes and error_message f…
Browse files Browse the repository at this point in the history
…or audit events
  • Loading branch information
Anish Kacham committed Nov 7, 2024
1 parent f1366f6 commit c2eb699
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/router/src/core/payments/operations/payment_reject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ impl<F: Clone> UpdateTracker<F, PaymentData<F>, 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 {
Expand Down

0 comments on commit c2eb699

Please sign in to comment.