fix: handle error handling (#20815)

This commit is contained in:
Rohan
2020-03-23 14:54:33 +05:30
committed by GitHub
parent 96297f73f2
commit 7ea79933b3

View File

@@ -238,7 +238,7 @@ class DeliveryTrip(Document):
try:
directions = maps_client.directions(**directions_data)
except Exception as e:
frappe.throw(_(e))
frappe.throw(_(str(e)))
return directions[0] if directions else False