From facaa2e0f61d289792fd08bb258c6502d2362c0c Mon Sep 17 00:00:00 2001 From: Om Rabara Date: Thu, 25 May 2023 11:31:24 +0000 Subject: [PATCH] [FIX] payment_paypal: ignore exception in sentry for missing notification data. ValidationError: PayPal: Missing value for txn_id (78X739757D473425R) or txn_type (None). This issue occurs when there is some missing value in the received notification_data while evaluating the '_process_notification_data' function. It raises an Exception which will be caught by the sentry. sentry-3954375754 closes odoo/odoo#123191 X-original-commit: 8c539133f374ad709b5ed7770b15a3233e2463b2 Signed-off-by: Antoine Vandevenne (anv) --- addons/payment_paypal/controllers/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/payment_paypal/controllers/main.py b/addons/payment_paypal/controllers/main.py index 9337afa2cbd..1dc0cd71a05 100644 --- a/addons/payment_paypal/controllers/main.py +++ b/addons/payment_paypal/controllers/main.py @@ -173,7 +173,9 @@ class PaypalController(http.Controller): # Handle the notification data tx_sudo._handle_notification_data('paypal', data) except ValidationError: # Acknowledge the notification to avoid getting spammed - _logger.exception("unable to handle the notification data; skipping to acknowledge") + _logger.warning( + "unable to handle the notification data; skipping to acknowledge", exc_info=True + ) return '' @staticmethod