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 cart error code when a Cart Transform Function encounters a runtime error during cart operations such as or .
Previously, when a Cart Transform Function failed, the Storefront API returned a generic error code 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 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"
}
]
}
}
}
Was this section helpful?