You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How to reproduce
Trying to empty a shipped order via API raises a 500 error, which is something we should try to avoid.
This can be easily demonstrated in the admin area:
on the Cart tab, add an item to a new order, and keep this browser window as it is, we'll get back to it later;
add the address, payment, and finalize the order in a different browser window/tab;
ship the order;
go back to the Cart browser window and click the Empty Cart button. Web developer tools will show a 500 error, and no message is presented to the user.
@order.empty!tries to reset the cart by destroying the associated records, but shipped shipments cannot be destroyed. The error bubbles up to the controller, where it's not handled.
The text was updated successfully, but these errors were encountered:
Solidus Version:
all, including master
How to reproduce
Trying to
empty
a shipped order via API raises a 500 error, which is something we should try to avoid.This can be easily demonstrated in the admin area:
Cart
tab, add an item to a new order, and keep this browser window as it is, we'll get back to it later;Cart
browser window and click theEmpty Cart
button. Web developer tools will show a 500 error, and no message is presented to the user.Context
This is the method definition from the API orders controller:
@order.empty!
tries to reset the cart by destroying the associated records, but shipped shipments cannot be destroyed. The error bubbles up to the controller, where it's not handled.The text was updated successfully, but these errors were encountered: