Explicitly notify Bugsnag on checkout failure

This commit is contained in:
Matt-Yorkley
2020-08-07 14:46:08 +01:00
parent 1123e08a98
commit ce5bcaaa20
2 changed files with 12 additions and 1 deletions

View File

@@ -24,7 +24,8 @@ Darkswarm.factory 'Checkout', ($injector, CurrentOrder, ShippingMethods, StripeE
try
@loadFlash(error: t("checkout.failed")) # inform the user about the unexpected error
finally
throw error # generate a BugsnagJS alert
Bugsnag.notify(error)
throw error
handle_checkout_error_response: (response) =>
throw response unless response.data?