Always throw back error even if there is an error loading the flash for example translating the error message

This commit is contained in:
Luis Ramos
2020-05-29 14:29:49 +01:00
parent 83edfbd1dd
commit 6e842212ea

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