fix(minor): update frappe.error_log to new API (#30864)

* fix(minor): update frappe.error_log to new API

* refactor: changes for updated log_error api

Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
Rushabh Mehta
2022-05-02 15:04:26 +05:30
committed by GitHub
parent dcda55641b
commit 548afba8bb
33 changed files with 59 additions and 97 deletions

View File

@@ -96,5 +96,5 @@ def check_mandate(data, reference_doctype, reference_docname):
return {"redirect_to": redirect_flow.redirect_url}
except Exception as e:
frappe.log_error(e, "GoCardless Payment Error")
frappe.log_error("GoCardless Payment Error")
return {"redirect_to": "/integrations/payment-failed"}

View File

@@ -60,7 +60,7 @@ def confirm_payment(redirect_flow_id, reference_doctype, reference_docname):
try:
create_mandate(data)
except Exception as e:
frappe.log_error(e, "GoCardless Mandate Registration Error")
frappe.log_error("GoCardless Mandate Registration Error")
gateway_controller = get_gateway_controller(reference_docname)
frappe.get_doc("GoCardless Settings", gateway_controller).create_payment_request(data)
@@ -68,7 +68,7 @@ def confirm_payment(redirect_flow_id, reference_doctype, reference_docname):
return {"redirect_to": confirmation_url}
except Exception as e:
frappe.log_error(e, "GoCardless Payment Error")
frappe.log_error("GoCardless Payment Error")
return {"redirect_to": "/integrations/payment-failed"}
@@ -103,4 +103,4 @@ def create_mandate(data):
).insert(ignore_permissions=True)
except Exception:
frappe.log_error(frappe.get_traceback())
frappe.log_error("Gocardless: Unable to create mandate")