Skip to content

Commit

Permalink
fix: Show proper error message for prepared report failure (#24733) (#…
Browse files Browse the repository at this point in the history
…24737)

(cherry picked from commit 12bbfd2)

Co-authored-by: Ankush Menat <ankush@frappe.io>
  • Loading branch information
mergify[bot] and ankush committed Feb 5, 2024
1 parent 55c5d8a commit 99676af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frappe/desk/query_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,9 @@ def get_report_data(doc, data):
try:
if data := json.loads(doc.get_prepared_data().decode("utf-8")):
report_data = get_report_data(doc, data)
except Exception:
except Exception as e:
doc.log_error("Prepared report render failed")
frappe.msgprint(_("Prepared report render failed"))
frappe.msgprint(_("Prepared report render failed") + f": {str(e)}")
doc = None

return report_data | {"prepared_report": True, "doc": doc}
Expand Down

0 comments on commit 99676af

Please sign in to comment.