when failing to send notification do not span console with exception messages.
This commit is contained in:
parent
6fa9741b86
commit
271fd8afdf
1 changed files with 4 additions and 2 deletions
|
|
@ -384,8 +384,10 @@ class Notification(metaclass=Singleton):
|
||||||
|
|
||||||
return respData
|
return respData
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
LOG.exception(e)
|
err_msg = str(e)
|
||||||
LOG.error(f"Error sending Notification event '{ev.event}: {ev.id}' to '{target.name}'. '{e!s}'.")
|
if not err_msg:
|
||||||
|
err_msg = type(e).__name__
|
||||||
|
LOG.error(f"Error sending Notification event '{ev.event}: {ev.id}' to '{target.name}'. '{err_msg!s}'.")
|
||||||
return {"url": target.request.url, "status": 500, "text": str(ev)}
|
return {"url": target.request.url, "status": 500, "text": str(ev)}
|
||||||
|
|
||||||
def emit(self, e: Event, _, **kwargs): # noqa: ARG002
|
def emit(self, e: Event, _, **kwargs): # noqa: ARG002
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue