422 Unprocessable Content when adding Bundle with Expand to cart

Topic summary

Intermittent 422 Unprocessable Content errors when adding Shopify customized bundle products to cart. Storefront messages include: “All 0 {product name} are in your cart.” and “The {product name} cannot be added to cart.” In some cases the bundle is actually added (confirmed by Functions logs), but the UI returns an error.

Behavior and scope:

  • Not reliably reproducible; once triggered, persists for that product until /cart/clear, then works again.
  • Does not affect other items in the cart at the same time.
  • Occurs across themes (Dawn, Crave, Pipeline) and multiple merchants; also reproduced following Shopify’s tutorial.
  • Checkout may show “Inventory issues – bundled item is sold out.”

Attempts/workarounds:

  • Inventory adjustments and setting inventory policy to CONTINUE did not help.
  • Sample payloads and theme code (application/x-www-form-urlencoded POST to /cart/add.js) provided; code snippets are central for debugging.

Shopify status:

  • Acknowledged by staff; suspected link to a recent rollout.
  • Escalated from Functions team to Cart team; investigation ongoing, no fix or ETA shared.

Impact and state:

  • Blocks adding custom bundles in some live stores, affecting checkout migration timelines.
  • Issue remains unresolved; awaiting root cause and fix from Shopify.
Summarized with AI on December 11. AI used: gpt-5.

I’m getting intermittent 422 Unprocessable Content errors on Merchants stores when adding bundle products to cart that run Expand. There’s no reliable way to replicate the error, and the payloads for successful and non successful calls are exactly the same.

Example payload that caused 422

form_type: product
utf8: ✓
id: 44061997924507
product-id: 7853945389211
section-id: template--16459352408219__main
properties[_bundleId]: KPVA-44061997924507
properties[_selectedItems]: [{"i":"44061751312539","q":1,"s":1},{"i":"44061795254427","q":1,"s":1},{"i":"44061783949467","q":1,"s":1}]
quantity: 1
sections: cart-notification-product,cart-notification-button,cart-icon-bubble
sections_url: /products/product-handle

Response:

{
    "status": 422,
    "message": "Cart Error",
    "description": "All 0 {product name} are in your cart."
}

The bundle does successfully add to cart which and shows a success in Functions logs, but the user (and the merchant) is presented with a storefront error - which is a huge issue for public apps.

Is this a bug?

3 Likes

Hey @AV_SL

Thanks for flagging this - checking with the Functions team and will report back.

1 Like

Really appreciate it! @SBD

@SBD We were able to replicate this again temporarily today.

  • Again, the bundle product adds to cart but returns the same 422 error consistently “All 0 {product name} are in your cart.”.
  • When trying to remove the bundle product from cart, another 422 error flags “The {product name} cannot be added to cart”.
  • If I go to /cart/clear to clear the cart, the product begins functioning again.
  • Once the error appears, it continuously appears for that product until the cart is cleared with /clear
  • The error does not appear for other products (bundle or standard) that in the cart, or being added to the cart, when an error prone product is already in cart, or experiencing issues.

Perhaps this is related to a bug that appears in cart, in a very specific instance - though we haven’t been able to find exactly what that instance is.

It honestly seems entirely random, given we had been adding this particular product to cart without issue for hours while working on other things.

Data below - I also have links to the successful Functions that ran at this time if you need.

Updated payloads with the error if they help at all…

quantity=1&form_type=product&utf8=%E2%9C%93&id=42780378267839&product-id=7639960617151§ion-id=template--16531935264959__main&properties%5B_bundleId%5D=ZXCX-42780378267839&properties%5B_selectedItems%5D=%5B%7B%22i%22%3A%2242656949600447%22%2C%22q%22%3A1%2C%22s%22%3A1%7D%2C%7B%22i%22%3A%2242656949272767%22%2C%22q%22%3A1%2C%22s%22%3A2%7D%5D

parsed:

quantity: 1
form_type: product
utf8: ✓
id: 42780378267839
product-id: 7639960617151
section-id: template--16531935264959__main
properties[_bundleId]: ZXCX-42780378267839
properties[_selectedItems]: [{"i":"42656949600447","q":1,"s":1},{"i":"42656949272767","q":1,"s":2}]

and how Pipeline (the theme in today’s error) submits the form:

addToCart(formData) {
          const url = `${window.theme.routes.cart}/add.js`;
          const formPayload = new URLSearchParams(formData).toString();

          return axios.post(url, formPayload, {
            headers: {
              'X-Requested-With': 'XMLHttpRequest',
              'Content-Type': 'application/x-www-form-urlencoded',
            },
          });
        },

Previously themes showing the error were Dawn and Crave so I don’t believe it’s theme related.

Thanks for all the details @AV_SL - they think this might be related to a recent rollout and are investigating.

1 Like

Hi @SBD - any developments on this issue? We’ve had another couple merchants stores returning the same issue randomly.

Thanks! Any update is much appreciated.

Hey @AV_SL

Looks like it’s still under investigation. Have pinged the team with a follow up. Will let you know as soon as I hear back.

1 Like

Hi @SBD

Hate to be the squeaky wheel on this - but we’ve just had another merchant using our app experience this issue. Is there an update on this issue?

Thanks

Hey @AV_SL

Thanks for checking in. It’s moved over to the Cart team. I’ve just asked them for an updated and should hear back overnight.

Really appreciate it @SBD Thanks!

Hi! I’m following along the customized bundles tutorial and get the same error. I’ve created the bundle product along with the components.

If I add the bundle product to cart I get : 422 “The bundle product ‘{product_name}’ cannot be added to the cart.”

Subsequent attempts result to: 422 “All 0 {product_name} are in the cart”

If I then add a regular product to cart and attempt checkout, I get “Inventory issues - my bundled item is sold out” on the checkout page.

Just curious if I’m doing something wrong or if it’s an issue with the functions api.

2 Likes

Hi @SBD

Thank you so much for your responses.
But we have also faced this issue from our merchants.

It feels like a bad excuse to tell that Shopify is looking into it. Haha!

It breaks down the merchant’s confidence as well when they get to know that it’s been 2 months so they might not get a fix for a long time.

Is there any update for this?

I’m getting this exact same issue.. Any luck getting it to work? I’ve tried modifying the bundle product’s variant with inventory, changing the inventory policy to “CONTINUE” and updating the child products with no success

1 Like

Same here, are there any updates on this? Can’t add a custom bundle to cart. Worked fine in a Dev Store, but breaks in a live store with the new checkout

@SBD this issue still occurs on some of our stores, has there been a fix on this and will there be a fix on this before the checkout migration deadline ?
we can not add custom bundles to the cart and we are getting this error.

→ we have to upgrade stores to the new custom bundle feature cause we also have to upgrade the checkout. (our alternations require this.)
and we get this error on some of the required stores them.

we need this functioning before we can perform the checkout migrahtions on some stores so the urgency is pretty high here.

Hi @SBD

Any news regarding this ? seems it’s still ocurring randomly on some merchant store

Similar issue, any news?