mirror of https://github.com/zulip/zulip.git
push_notifications: Reduce log level for weird warning.
This issue isn't something a system administrator needs to take action on -- it's a likely minor logic bug around organization administrators moving topics between streams. As a result, it shouldn't send error emails to administrators.
This commit is contained in:
parent
4f9f6b18e7
commit
289819fb70
|
@ -770,7 +770,7 @@ def handle_push_notification(user_profile_id: int, missed_message: Dict[str, Any
|
|||
# If the cause is a race with the message being deleted,
|
||||
# that's normal and we have no need to log an error.
|
||||
return
|
||||
logging.error(
|
||||
logging.info(
|
||||
"Unexpected message access failure handling push notifications: %s %s",
|
||||
user_profile.id, missed_message['message_id'],
|
||||
)
|
||||
|
|
|
@ -878,13 +878,13 @@ class HandlePushNotificationTest(PushNotificationTest):
|
|||
|
||||
# This should log an error
|
||||
with mock.patch('zerver.lib.push_notifications.uses_notification_bouncer') as mock_check, \
|
||||
mock.patch('logging.error') as mock_logging_error, \
|
||||
mock.patch('logging.info') as mock_logging_info, \
|
||||
mock.patch('zerver.lib.push_notifications.push_notifications_enabled', return_value = True) as mock_push_notifications:
|
||||
handle_push_notification(user_profile.id, missed_message)
|
||||
mock_push_notifications.assert_called_once()
|
||||
# Check we didn't proceed through.
|
||||
mock_check.assert_not_called()
|
||||
mock_logging_error.assert_called_once()
|
||||
mock_logging_info.assert_called_once()
|
||||
|
||||
def test_send_notifications_to_bouncer(self) -> None:
|
||||
user_profile = self.example_user('hamlet')
|
||||
|
|
Loading…
Reference in New Issue