Access a community of over 900,000 Shopify Merchants and Partners and engage in meaningful conversations with your peers.
If I add an item to my cart and then it subsequently goes out of stock the API returns a 422 when trying to remove it from my cart.
I POST to `/cart/change.js` and try and set the quantity to 0 and it returns 422:
"message": "Cart Error",
"description": "The product 'xxx' is already sold out."
Just use POST /cart/update.js: https://shopify.dev/api/ajax/reference/cart#post-cart-update-js