Merge pull request #27480 from akhilnarang/fix-notification-error-handling

fix(notification): can't use `message` where it isn't defined
This commit is contained in:
Akhil Narang 2024-08-22 11:04:27 +05:30 committed by GitHub
commit 7e2a69a95b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -612,8 +612,8 @@ def evaluate_alert(doc: Document, alert, event):
frappe.throw(message, title=_("Error in Notification"))
except Exception as e:
title = str(e)
frappe.log_error(title=title)
message = frappe.get_traceback(with_context=True)
frappe.log_error(title=title, message=message)
msg = f"<details><summary>{title}</summary>{message}</details>"
frappe.throw(msg, title=_("Error in Notification"))