Improve error handling #146

Merged
pfm merged 4 commits from error-handling into main 2024-03-03 09:35:04 +01:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit e28864074c - Show all commits

View File

@ -48,9 +48,9 @@ class MailEncryptionProxy:
try:
new_message = operation.perform(message)
send(new_message, operation.recipients())
except (EncryptionException, MailSerialisationException, UnicodeEncodeError) as e:
except (EncryptionException, MailSerialisationException, UnicodeEncodeError):
# If the message can't be encrypted, deliver cleartext.
LOG.error('Unable to encrypt message, delivering in cleartext: %s', e)
LOG.exception('Unable to encrypt message, delivering in cleartext')
if not isinstance(operation, KeepIntact):
self._send_unencrypted(operation, envelope, send)
else: