From 792a44b3822e834728422a91daf15648b11cb230 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Wed, 30 Aug 2023 12:15:59 -0700 Subject: [PATCH] push_notifications: Fix logging.exception misuse. logging.exception should only be called from an exception handler. https://docs.python.org/3/library/logging.html#logging.exception Signed-off-by: Anders Kaseorg --- zerver/lib/push_notifications.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zerver/lib/push_notifications.py b/zerver/lib/push_notifications.py index ad9987cc59..777a364f3e 100644 --- a/zerver/lib/push_notifications.py +++ b/zerver/lib/push_notifications.py @@ -282,7 +282,7 @@ def send_apple_push_notification( device.token, ) elif isinstance(result, BaseException): - logger.exception( + logger.error( "APNs: Error sending for user %s to device %s", user_identity, device.token,