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.
This commit is contained in:
Kumi 2024-11-08 13:08:01 +01:00
parent b33f905b3c
commit 105e5c7abe
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -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):