Merge pull request #27152 from barredterra/handle-errors-during-error-handling
fix(Email Account): handle errors during error handling
This commit is contained in:
commit
23539e3dc7
1 changed files with 9 additions and 4 deletions
|
|
@ -599,10 +599,15 @@ class EmailAccount(Document):
|
|||
frappe.db.rollback()
|
||||
except Exception:
|
||||
frappe.db.rollback()
|
||||
self.log_error(title="EmailAccount.receive")
|
||||
if self.use_imap:
|
||||
self.handle_bad_emails(mail.uid, mail.raw_message, frappe.get_traceback())
|
||||
exceptions.append(frappe.get_traceback())
|
||||
try:
|
||||
self.log_error(title="EmailAccount.receive")
|
||||
if self.use_imap:
|
||||
self.handle_bad_emails(mail.uid, mail.raw_message, frappe.get_traceback())
|
||||
exceptions.append(frappe.get_traceback())
|
||||
except Exception:
|
||||
frappe.db.rollback()
|
||||
else:
|
||||
frappe.db.commit()
|
||||
else:
|
||||
frappe.db.commit()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue