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

This commit is contained in:
Saqib Ansari 2022-05-18 11:53:00 +05:30 committed by GitHub
parent 65d55ea8fa
commit 9fb7b49b43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -649,6 +649,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)
@ -765,7 +767,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,
)