Only show notification target, id or url incase of error loading the target.

This commit is contained in:
arabcoders 2025-04-09 19:41:54 +03:00
parent c2fa066669
commit ee2fd3f398

View file

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