Merge pull request #5528 from luisramos0/checkout_js

Make checkout JS code send bugsnag alert even if there's an error processing an error
This commit is contained in:
Pau Pérez Fabregat
2020-06-03 09:13:40 +02:00
committed by GitHub

View File

@@ -21,8 +21,10 @@ Darkswarm.factory 'Checkout', ($injector, CurrentOrder, ShippingMethods, StripeE
try
@handle_checkout_error_response(response)
catch error
@loadFlash(error: t("checkout.failed")) # inform the user about the unexpected error
throw error # generate a BugsnagJS alert
try
@loadFlash(error: t("checkout.failed")) # inform the user about the unexpected error
finally
throw error # generate a BugsnagJS alert
handle_checkout_error_response: (response) =>
if response.data.path