Skip to content

Commit

Permalink
fix: preserve original error message (#25682) (#25684)
Browse files Browse the repository at this point in the history
(cherry picked from commit 85f66c0)

Co-authored-by: Ankush Menat <ankush@frappe.io>
  • Loading branch information
mergify[bot] and ankush committed Mar 27, 2024
1 parent 4bafb5c commit 0737e84
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 @@ -115,8 +115,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 0737e84

Please sign in to comment.