fix(DX): capture tracebacks with context (backport #39060) (#39062)

* fix(DX): capture tracebacks with context (#39060)

(cherry picked from commit 510fdf7bf6)

# Conflicts:
#	erpnext/manufacturing/doctype/bom_creator/bom_creator.py

* Delete erpnext/manufacturing/doctype/bom_creator/bom_creator.py

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
mergify[bot]
2024-01-01 15:38:22 +05:30
committed by GitHub
parent b8dce3eeac
commit fe9acc898e
6 changed files with 7 additions and 9 deletions

View File

@@ -62,7 +62,7 @@ def retry_failed_transactions(failed_docs: list | None):
task(log.transaction_name, log.from_doctype, log.to_doctype)
except Exception as e:
frappe.db.rollback(save_point="before_creation_state")
update_log(log.name, "Failed", 1, str(frappe.get_traceback()))
update_log(log.name, "Failed", 1, str(frappe.get_traceback(with_context=True)))
else:
update_log(log.name, "Success", 1)
@@ -86,7 +86,7 @@ def job(deserialized_data, from_doctype, to_doctype):
fail_count += 1
create_log(
doc_name,
str(frappe.get_traceback()),
str(frappe.get_traceback(with_context=True)),
from_doctype,
to_doctype,
status="Failed",