app/controllers/spree/api/v2/storefront/checkout_controller.rb in spree_api-4.1.7 vs app/controllers/spree/api/v2/storefront/checkout_controller.rb in spree_api-4.1.8

- old
+ new

@@ -63,10 +63,14 @@ end def shipping_rates result = shipping_rates_service.call(order: spree_current_order) - render_serialized_payload { serialize_shipping_rates(result.value) } + if result.success? + render_serialized_payload { serialize_shipping_rates(result.value) } + else + render_error_payload(result.error) + end end def payment_methods render_serialized_payload { serialize_payment_methods(spree_current_order.available_payment_methods) } end