mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Add a comment to explain the necessity of the first rescue in the update action
This commit is contained in:
@@ -51,6 +51,8 @@ class CheckoutController < Spree::StoreController
|
||||
|
||||
checkout_workflow(params_adapter.shipping_method_id)
|
||||
rescue Spree::Core::GatewayError => e
|
||||
# This rescue is not replaceable by the generic rescue_from above because otherwise the rescue
|
||||
# below (StandardError) would catch the GatewayError and report it as a generic error
|
||||
rescue_from_spree_gateway_error(e)
|
||||
rescue StandardError => e
|
||||
flash[:error] = I18n.t("checkout.failed")
|
||||
|
||||
Reference in New Issue
Block a user