From ee2fd3f398ac15045c0bf8bebca4dcf518e92cc4 Mon Sep 17 00:00:00 2001 From: arabcoders Date: Wed, 9 Apr 2025 19:41:54 +0300 Subject: [PATCH] Only show notification target, id or url incase of error loading the target. --- app/library/Notifications.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/library/Notifications.py b/app/library/Notifications.py index a1a7f6f4..cdfb27d3 100644 --- a/app/library/Notifications.py +++ b/app/library/Notifications.py @@ -215,7 +215,8 @@ class Notification(metaclass=Singleton): try: Notification.validate(target) except ValueError as e: - LOG.error(f"Invalid notification target '{target}'. '{e!s}'") + name = target.get("name") or target.get("id") or target.get("request", {}).get("url") or "unknown" + LOG.error(f"Invalid notification target '{name}'. '{e!s}'") continue target = self.make_target(target)