fix(india): error while parsing e-invoice (#31061)

This commit is contained in:
mergify[bot]
2022-05-18 12:44:24 +05:30
committed by GitHub
parent 95491e1718
commit 1461d66dda

View File

@@ -648,6 +648,8 @@ def make_einvoice(invoice):
try:
einvoice = safe_json_load(einvoice)
einvoice = santize_einvoice_fields(einvoice)
except json.JSONDecodeError:
raise
except Exception:
show_link_to_error_log(invoice, einvoice)
@@ -764,7 +766,9 @@ def safe_json_load(json_string):
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,
)