From 0122ce451ce717087414fbf673cc4bedbed76a8a Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Wed, 19 Jun 2024 11:56:17 -0700 Subject: [PATCH] Put in small logging tweak (#1576) --- pay-queue/src/pay_queue/resources/worker.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pay-queue/src/pay_queue/resources/worker.py b/pay-queue/src/pay_queue/resources/worker.py index aee57b242..37dfc277c 100644 --- a/pay-queue/src/pay_queue/resources/worker.py +++ b/pay-queue/src/pay_queue/resources/worker.py @@ -55,7 +55,7 @@ def worker(): raise Exception('Invalid queue message type') # pylint: disable=broad-exception-raised return {}, HTTPStatus.OK - except Exception: # pylint: disable=broad-exception-caught - current_app.logger.error('Failed to process queue message: %s', HTTPStatus.INTERNAL_SERVER_ERROR) - # Optionally, return an error status code or message + except Exception: # NOQA # pylint: disable=broad-except + # Catch Exception so that any error is still caught and the message is removed from the queue + current_app.logger.error('Error processing event:', exc_info=True) return {}, HTTPStatus.OK