fix: handle error handling (#20814)

This commit is contained in:
Rohan
2020-03-16 17:57:15 +05:30
committed by GitHub
parent e7a6a4b009
commit 281a9fdf07

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