Skip to content

Commit be36b89

Browse files
authored
chore: harmless timeout ignore (#179)
1 parent fad4a24 commit be36b89

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/spotted/debug/log_manager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ async def notify_error_admin(context: CallbackContext, traceback_str: str):
6969
"""
7070
traceback_str = traceback_str.replace(Config.settings_get("token"), "[bot_token]")
7171
text = f"An exception was raised:\n" f"<pre>{html.escape(traceback_str)}</pre>"
72-
await context.bot.send_message(chat_id=Config.post_get("admin_group_id"), text=text, parse_mode=ParseMode.HTML)
72+
if "telegram.error.TimedOut: Timed out" not in traceback_str:
73+
await context.bot.send_message(chat_id=Config.post_get("admin_group_id"), text=text, parse_mode=ParseMode.HTML)
7374

7475

7576
async def log_message(update: Update, _: CallbackContext):

0 commit comments

Comments
 (0)