From 105e5c7abe3820363cd73eb7671efebad65c7718 Mon Sep 17 00:00:00 2001 From: Kumi Date: Fri, 8 Nov 2024 13:08:01 +0100 Subject: [PATCH] fix(logging): enhance error logging for message relay Improved error logs by including the event type when a message relay fails. This aids in debugging by providing more context about the nature of the error. --- src/matrix_applicationbot/classes/bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matrix_applicationbot/classes/bot.py b/src/matrix_applicationbot/classes/bot.py index 0cbcc5c..f5c959a 100644 --- a/src/matrix_applicationbot/classes/bot.py +++ b/src/matrix_applicationbot/classes/bot.py @@ -631,7 +631,7 @@ class ApplicationBot: target_room_id, "m.room.message", event.source["content"] ) except Exception as e: - logging.error(f"Failed to relay message: {e}") + logging.error(f"Failed to relay message of type {type(event)}: {e}") logging.debug(f"Event source: {event.source}") async def help_command(self, room, sender):