Browse Source

fix: Log errors correctly

Prior to this, no tracebacks were logged and the body of the log only
had what was supposed to be the title
version-14
Gavin D'souza 3 years ago
parent
commit
6b6e10f7c5
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      frappe/email/doctype/email_account/email_account.py

+ 3
- 2
frappe/email/doctype/email_account/email_account.py View File

@@ -441,7 +441,7 @@ class EmailAccount(Document):
frappe.db.rollback()
except Exception:
frappe.db.rollback()
frappe.log_error('email_account.receive')
frappe.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())
@@ -641,7 +641,8 @@ class EmailAccount(Document):
message = safe_encode(message)
email_server.imap.append("Sent", "\\Seen", imaplib.Time2Internaldate(time.time()), message)
except Exception:
frappe.log_error()
frappe.log_error(title="EmailAccount.append_email_to_sent_folder")


@frappe.whitelist()
def get_append_to(doctype=None, txt=None, searchfield=None, start=None, page_len=None, filters=None):


Loading…
Cancel
Save