Tags:
- Storefront GraphQL API
- 2025-10
Cart mutations now return error for invalid merchandise configuration
We have enhanced error handling for cart mutations to provide clearer feedback when merchandise cannot be added to or maintained in a cart. The cart API now returns a error code for specific merchandise-related issues.
When This Error Occurs
The error is triggered in the following scenarios:
Inventory & Availability Issues:
- The item is out of stock or insufficient stock is available for the requested quantity.
- The product is not published or is unavailable in the buyer's location.
- The inventory record is missing.
- The product variant does not exist.
Pricing & Configuration Issues:
- There is a discrepancy between expected and actual prices.
- Gift cards have zero or invalid amounts.
- Bundle products lack required components.
- The cart line item limit is exceeded.
What This Means for Your Integration
If you receive a error:
- The specified merchandise cannot be added to the cart in its current configuration.
- Notify customers about the availability issue.
- Refresh product data or adjust quantities as needed.
- For bundles, ensure all required components are present.
Was this section helpful?