From ad9b0e62a49d1d8a078a135a3c1731dcda290cc8 Mon Sep 17 00:00:00 2001 From: rht Date: Wed, 15 Nov 2023 07:02:27 -0500 Subject: [PATCH] IRC: Handle error by displaying the error message. The proper solution would be to handle each errors differently. But for now, logging the message is at least informative to the user. --- zulip/integrations/bridge_with_irc/irc_mirror_backend.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zulip/integrations/bridge_with_irc/irc_mirror_backend.py b/zulip/integrations/bridge_with_irc/irc_mirror_backend.py index 5ee0fd14d..8fdd6c98f 100644 --- a/zulip/integrations/bridge_with_irc/irc_mirror_backend.py +++ b/zulip/integrations/bridge_with_irc/irc_mirror_backend.py @@ -1,3 +1,4 @@ +import logging import multiprocessing as mp import sys from typing import Any, Dict, Optional @@ -141,3 +142,6 @@ def on_dccchat(self, c: ServerConnection, e: Event) -> None: except ValueError: return self.dcc_connect(address, port) + + def on_error(self, c: ServerConnection, e: Event) -> None: + logging.error("error from server: %s", e.target)