Skip to content

Commit

Permalink
IRC: Handle error by displaying the error message.
Browse files Browse the repository at this point in the history
The proper solution would be to handle each errors differently. But for
now, logging the message is at least informative to the user.
  • Loading branch information
rht authored and andersk committed Nov 20, 2023
1 parent 28cae1a commit ad9b0e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions zulip/integrations/bridge_with_irc/irc_mirror_backend.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import logging
import multiprocessing as mp
import sys
from typing import Any, Dict, Optional
Expand Down Expand Up @@ -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)

0 comments on commit ad9b0e6

Please sign in to comment.