Avoid error logs for the cases when payment was rejected by expected reasons

Created on 18 December 2024, 4 days ago

Problem/Motivation

The entrypoint `/commerce/payment/capture/` adds an error log for the cases when the payment has been cancelled without any real error, which could include the following reasons (based on "commerce_decoupled_stripe" module):
- The payment has been cancelled by user
- The payment has expired
- The payment is not (yet) succeeded

It clogs the logs and if rollbar module is enabled, it creates an error notifiation there, what is not necessary, because no real problem there.

Proposed resolution

Avoid creating error logs for "Drupal\commerce_payment\Exception\DeclineException" errors.

🐛 Bug report
Status

Active

Version

1.5

Component

Code

Created by

🇧🇾Belarus beloglazov91

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024