Skip to content

Commit

Permalink
fix: preserve original error message (frappe#25682)
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush authored Mar 27, 2024
1 parent 8cebe9f commit 85f66c0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frappe/email/smtp.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import frappe
from frappe import _
from frappe.email.oauth import Oauth
from frappe.utils import cint, cstr
from frappe.utils import cint, cstr, get_traceback


class InvalidEmailCredentials(frappe.ValidationError):
Expand Down Expand Up @@ -129,8 +129,9 @@ def quit(self):

@classmethod
def throw_invalid_credentials_exception(cls):
original_exception = get_traceback() or "\n"
frappe.throw(
_("Please check your email login credentials."),
_("Please check your email login credentials.") + " " + original_exception.splitlines()[-1],
title=_("Invalid Credentials"),
exc=InvalidEmailCredentials,
)

0 comments on commit 85f66c0

Please sign in to comment.