Skip to content
Snippets Groups Projects
Commit 02a3a6eb authored by florimondmanca's avatar florimondmanca
Browse files

another error logging fix

parent 9015d7a5
Branches
No related tags found
No related merge requests found
"""Mails app signals."""
from django.dispatch import Signal, receiver
from python_http_client import HTTPError
from logs import get_logger
......@@ -28,4 +29,7 @@ def log_app_disabled(sender, subject, recipient_list, **kwargs):
@receiver(failed)
def log_failed(sender, exception, **kwargs):
"""Log an exception that occurred during a mail delivery."""
if isinstance(exception, HTTPError):
logger.exception(exception.body)
else:
logger.exception(exception)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment