mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 20:02:15 +00:00
Don't log exceptions that we know aren't bugs when adding events to event queues
(imported from commit 55074e68603119bd11cc5218453a4e1eab710feb)
This commit is contained in:
@@ -100,6 +100,7 @@ class ClientDescriptor(object):
|
||||
|
||||
def finish_current_handler(self):
|
||||
if self.current_handler is not None:
|
||||
err_msg = "Got error finishing handler for queue %s" % (self.event_queue.id,)
|
||||
try:
|
||||
# We call async_request_restart here in case we are
|
||||
# being finished without any events (because another
|
||||
@@ -111,8 +112,14 @@ class ClientDescriptor(object):
|
||||
queue_id=self.event_queue.id),
|
||||
self.current_handler._request,
|
||||
apply_markdown=self.apply_markdown)
|
||||
except IOError as e:
|
||||
if e.message != 'Stream is closed':
|
||||
logging.exception(err_msg)
|
||||
except AssertionError as e:
|
||||
if e.message != 'Request closed':
|
||||
logging.exception(err_msg)
|
||||
except Exception:
|
||||
logging.exception("Got error finishing handler for queue %s" % (self.event_queue.id))
|
||||
logging.exception(err_msg)
|
||||
finally:
|
||||
self.disconnect_handler()
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user