fix(india): error while parsing e-invoice (#31053)
diff --git a/erpnext/regional/india/e_invoice/utils.py b/erpnext/regional/india/e_invoice/utils.py
index 7cc636e..bcb3e4f 100644
--- a/erpnext/regional/india/e_invoice/utils.py
+++ b/erpnext/regional/india/e_invoice/utils.py
@@ -649,6 +649,8 @@
try:
einvoice = safe_json_load(einvoice)
einvoice = santize_einvoice_fields(einvoice)
+ except json.JSONDecodeError:
+ raise
except Exception:
show_link_to_error_log(invoice, einvoice)
@@ -765,7 +767,9 @@
frappe.throw(
_(
"Error in input data. Please check for any special characters near following input: <br> {}"
- ).format(snippet)
+ ).format(snippet),
+ title=_("Invalid JSON"),
+ exc=e,
)