---
title: >-
  Cart Mutations return a new cart on FailedToRetrieveCart error - 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/cart-mutations-return-a-new-cart-on-failedtoretrievecart-error
  md: >-
    https://shopify.dev/changelog/cart-mutations-return-a-new-cart-on-failedtoretrievecart-error.md
metadata:
  effectiveApiVersion: ''
  affectedApi: []
  primaryTag:
    displayName: API
    handle: api
  secondaryTag:
    displayName: Update
    handle: update
  indicatesActionRequired: false
  createdAt: '2023-01-25T14:41:10-05:00'
  postedAt: '2023-01-25T00:00:00-05:00'
  updatedAt: '2024-02-02T10:05:10-05:00'
  effectiveAt: '2023-01-25T00:00:00-05:00'
---

January 25, 2023

Tags:

* API

# Cart Mutations return a new cart on FailedToRetrieveCart error

In order to make the Cart SFAPI experience more seamless, we're rolling out changes to Cart Update mutations so they return a new, valid Cart even if the provided token is no longer valid. If a Cart is found for the provided token, the mutations will work the way they always have. That way you get back a a valid, updated Cart in your response, no matter what.

These mutations will return a new, empty cart:

* `cartLinesRemove`
* `cartLinesUpdate`
* `cartSelectedDeliveryOptionsUpdate`

The following mutations will update the new cart with the requested input:

* `cartAttributesUpdate`
* `cartBuyerIdentityUpdate`
* `cartDiscountCodesUpdate`
* `cartLinesAdd`
* `cartNoteUpdate`

To take advantage of this, use the new Cart ID from the returned Cart when you receive the `FailedToRetrieveCart` error code in your response. Please note that the new cart is **not** a copy of the cart whose token was invalid.
