chore(lint): cleanup repeated cause exception in logging.exception replaced by helpful message (#10425)
This commit is contained in:
parent
db1d2aaff5
commit
51db59622c
47 changed files with 83 additions and 72 deletions
|
|
@ -39,13 +39,13 @@ class SMTPClient:
|
|||
|
||||
smtp.sendmail(self._from, mail["to"], msg.as_string())
|
||||
except smtplib.SMTPException as e:
|
||||
logging.exception(f"SMTP error occurred: {str(e)}")
|
||||
logging.exception("SMTP error occurred")
|
||||
raise
|
||||
except TimeoutError as e:
|
||||
logging.exception(f"Timeout occurred while sending email: {str(e)}")
|
||||
logging.exception("Timeout occurred while sending email")
|
||||
raise
|
||||
except Exception as e:
|
||||
logging.exception(f"Unexpected error occurred while sending email: {str(e)}")
|
||||
logging.exception(f"Unexpected error occurred while sending email to {mail['to']}")
|
||||
raise
|
||||
finally:
|
||||
if smtp:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue