From 8dd72a641630c5916b23c7cc53db2595412977fe Mon Sep 17 00:00:00 2001 From: HgO Date: Sun, 17 Jul 2022 00:29:36 +0200 Subject: [PATCH] improve error log --- matrix_alertbot/callback.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/matrix_alertbot/callback.py b/matrix_alertbot/callback.py index b654304..72dace2 100644 --- a/matrix_alertbot/callback.py +++ b/matrix_alertbot/callback.py @@ -229,13 +229,15 @@ class Callbacks: if event.sender == self.config.user_id: return - if event.redacts not in self.cache: - logger.warning(f"Error removing silence from reaction {event.redacts}") - return - logger.debug( f"Read alert event ID for redacted event {event.redacts} from cache" ) + + if event.redacts not in self.cache: + logger.warning( + f"Unable to remove silences from event {event.redacts}: Redacted event is not in cache" + ) + return alert_event_id: str = self.cache[event.redacts] try: