Fix(integrations): Adding Error Logs for Woocommerce (#18061)
(cherry picked from commit ae255d6328b70b148d28d9a88a695932656bf276)
This commit is contained in:
parent
51c600696e
commit
48535e95e6
@ -22,7 +22,16 @@ def verify_request():
|
||||
frappe.set_user(woocommerce_settings.creation_user)
|
||||
|
||||
@frappe.whitelist(allow_guest=True)
|
||||
def order():
|
||||
def order(*args, **kwargs):
|
||||
try:
|
||||
_order(*args, **kwargs)
|
||||
except Exception:
|
||||
error_message = frappe.get_traceback()+"\n\n Request Data: \n"+json.loads(frappe.request.data).__str__()
|
||||
frappe.log_error(error_message, "WooCommerce Error")
|
||||
raise
|
||||
|
||||
|
||||
def _order(*args, **kwargs):
|
||||
woocommerce_settings = frappe.get_doc("Woocommerce Settings")
|
||||
if frappe.flags.woocomm_test_order_data:
|
||||
fd = frappe.flags.woocomm_test_order_data
|
||||
|
Loading…
Reference in New Issue
Block a user