fix: preserve original error message (#25682)
This commit is contained in:
parent
8cebe9f2de
commit
85f66c083e
1 changed files with 3 additions and 2 deletions
|
|
@ -7,7 +7,7 @@ from contextlib import suppress
|
|||
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):
|
||||
|
|
@ -129,8 +129,9 @@ class SMTPServer:
|
|||
|
||||
@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,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue