Skip to content

Commit

Permalink
fix: error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
barredterra committed Mar 6, 2024
1 parent e197463 commit 8a5fb08
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions erpnext_shipping/erpnext_shipping/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ def match_parcel_service_type_carrier(shipment_prices, reference):


def show_error_alert(action):
log = frappe.log_error(frappe.get_traceback())
link_to_log = frappe.utils.get_link_to_form("Error Log", log.name, "See what happened.")
log = frappe.log_error(title="Shipping Error")
link_to_log = get_link_to_form("Error Log", log.name, "See what happened.")
frappe.msgprint(
_("An Error occurred while {0}. {1}").format(action, link_to_log), indicator="orange", alert=True
msg=_("An Error occurred while {0}. {1}").format(action, link_to_log),
indicator="orange",
alert=True
)


Expand Down

0 comments on commit 8a5fb08

Please sign in to comment.