mirror of https://github.com/zulip/zulip.git
push_notifications: Increase severity of APNs ConnectionError.
This has only happened when our APNs certificate expired; logging at the error level ensures that this shows up in Sentry.
This commit is contained in:
parent
20bb1b70d1
commit
ca506f71dc
|
@ -233,12 +233,11 @@ def send_apple_push_notification(
|
|||
result = apns_context.loop.run_until_complete(
|
||||
apns_context.apns.send_notification(request)
|
||||
)
|
||||
except aioapns.exceptions.ConnectionError as e:
|
||||
logger.warning(
|
||||
"APNs: ConnectionError sending for user %s to device %s: %s",
|
||||
except aioapns.exceptions.ConnectionError:
|
||||
logger.error(
|
||||
"APNs: ConnectionError sending for user %s to device %s; check certificate expiration",
|
||||
user_identity,
|
||||
device.token,
|
||||
e.__class__.__name__,
|
||||
)
|
||||
continue
|
||||
|
||||
|
|
|
@ -1609,7 +1609,7 @@ class TestAPNs(PushNotificationTest):
|
|||
)
|
||||
self.send(devices=self.devices()[0:1])
|
||||
self.assertIn(
|
||||
f"WARNING:zerver.lib.push_notifications:APNs: ConnectionError sending for user <id:{self.user_profile.id}> to device {self.devices()[0].token}: ConnectionError",
|
||||
f"ERROR:zerver.lib.push_notifications:APNs: ConnectionError sending for user <id:{self.user_profile.id}> to device {self.devices()[0].token}; check certificate expiration",
|
||||
logger.output,
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue