--- title: Storefront API now returns a specific error code when Cart Transform Functions fail - Shopify developer changelog description: Shopify’s developer changelog documents all changes to Shopify’s platform. Find the latest news and learn about new platform opportunities. source_url: html: https://shopify.dev/changelog/storefront-api-now-returns-a-specific-error-code-when-cart-transform-functions-fail md: https://shopify.dev/changelog/storefront-api-now-returns-a-specific-error-code-when-cart-transform-functions-fail.md --- [Back to Developer changelog](https://shopify.dev/changelog) January 21, 2026 Tags: * Storefront GraphQL API * 2026-04 # Storefront API now returns a specific error code when Cart Transform Functions fail As of API version 2026-04, the Storefront API will return a `MERCHANDISE_LINE_TRANSFORMERS_RUN_ERROR` [cart error code](https://shopify.dev/docs/api/storefront/latest/enums/CartErrorCode) when a [Cart Transform Function](https://shopify.dev/docs/api/functions/latest/cart-transform) encounters a runtime error during cart operations such as [`cartCreate`](https://shopify.dev/docs/api/storefront/latest/mutations/cartCreate) or [`cartLinesAdd`](https://shopify.dev/docs/api/storefront/latest/mutations/cartLinesAdd). Previously, when a Cart Transform Function failed, the Storefront API returned a generic [`INVALID` error code](https://shopify.dev/docs/api/storefront/latest/enums/CartErrorCode#enums-INVALID) with the message "An error occurred in your cart." This made it difficult to distinguish between failures in Cart Transform Functions and other validation errors programmatically. With the introduction of the specific `MERCHANDISE_LINE_TRANSFORMERS_RUN_ERROR` code, you can now: * Identify and handle Cart Transform Function failures separately from other cart errors. * Implement more precise error handling and debugging in your storefront. This change enhances your ability to maintain and troubleshoot your storefront implementation effectively. Example error response: ``` { "data": { "cartCreate": { "cart": null, "userErrors": [ { "code": "MERCHANDISE_LINE_TRANSFORMERS_RUN_ERROR" } ] } } } ```