---
title: CartErrorCode - Storefront API
description: >
  Error codes returned by
  [`CartUserError`](/docs/api/storefront/2026-01/objects/CartUserError) during
  cart mutations. Covers validation failures for addresses, quantities, delivery
  options, merchandise lines, discount codes, and metafields.
api_version: 2026-01
api_name: storefront
type: enum
api_type: graphql
source_url:
  html: 'https://shopify.dev/docs/api/storefront/latest/enums/CartErrorCode'
  md: 'https://shopify.dev/docs/api/storefront/latest/enums/CartErrorCode.md'
---

# Cart​Error​Code

enum

Error codes returned by [`CartUserError`](https://shopify.dev/docs/api/storefront/2026-01/objects/CartUserError) during cart mutations. Covers validation failures for addresses, quantities, delivery options, merchandise lines, discount codes, and metafields.

## Valid values

* ADDRESS\_​FIELD\_​CONTAINS\_​EMOJIS

  The specified address field contains emojis.

* ADDRESS\_​FIELD\_​CONTAINS\_​HTML\_​TAGS

  The specified address field contains HTML tags.

* ADDRESS\_​FIELD\_​CONTAINS\_​URL

  The specified address field contains a URL.

* ADDRESS\_​FIELD\_​DOES\_​NOT\_​MATCH\_​EXPECTED\_​PATTERN

  The specified address field does not match the expected pattern.

* ADDRESS\_​FIELD\_​IS\_​REQUIRED

  The specified address field is required.

* ADDRESS\_​FIELD\_​IS\_​TOO\_​LONG

  The specified address field is too long.

* BUNDLES\_​AND\_​ADDONS\_​CANNOT\_​BE\_​MIXED

  Bundles and addons cannot be mixed.

* BUYER\_​CANNOT\_​PURCHASE\_​FOR\_​COMPANY\_​LOCATION

  Buyer cannot purchase for company location.

* CART\_​TOO\_​LARGE

  The cart is too large to save.

* GIFT\_​CARD\_​RECIPIENT\_​INVALID

  The specified gift card recipient is invalid.

* INVALID

  The input value is invalid.

* INVALID\_​COMPANY\_​LOCATION

  Company location not found or not allowed.

* INVALID\_​DELIVERY\_​ADDRESS\_​ID

  The delivery address was not found.

* INVALID\_​DELIVERY\_​GROUP

  Delivery group was not found in cart.

* INVALID\_​DELIVERY\_​OPTION

  Delivery option was not valid.

* INVALID\_​INCREMENT

  The quantity must be a multiple of the specified increment.

* INVALID\_​MERCHANDISE\_​LINE

  Merchandise line was not found in cart.

* INVALID\_​METAFIELDS

  The metafields were not valid.

* INVALID\_​ZIP\_​CODE\_​FOR\_​COUNTRY

  The given zip code is invalid for the provided country.

* INVALID\_​ZIP\_​CODE\_​FOR\_​PROVINCE

  The given zip code is invalid for the provided province.

* LESS\_​THAN

  The input value should be less than the maximum value allowed.

* MAXIMUM\_​EXCEEDED

  The quantity must be below the specified maximum for the item.

* MERCHANDISE\_​NOT\_​APPLICABLE

  Item cannot be purchased as configured.

* MINIMUM\_​NOT\_​MET

  The quantity must be above the specified minimum for the item.

* MISSING\_​CUSTOMER\_​ACCESS\_​TOKEN

  The customer access token is required when setting a company location.

* MISSING\_​DISCOUNT\_​CODE

  Missing discount code.

* MISSING\_​NOTE

  Missing note.

* NOTE\_​TOO\_​LONG

  The note length must be below the specified maximum.

* ONLY\_​ONE\_​DELIVERY\_​ADDRESS\_​CAN\_​BE\_​SELECTED

  Only one delivery address can be selected.

* PARENT\_​LINE\_​INVALID\_​REFERENCE

  Cannot reference existing parent lines by variant\_id.

* PARENT\_​LINE\_​NESTING\_​TOO\_​DEEP

  Parent line nesting is too deep or circular.

* PARENT\_​LINE\_​NOT\_​FOUND

  Parent line not found.

* PARENT\_​LINE\_​OPERATION\_​BLOCKED

  Nested cartlines are blocked due to an incompatibility.

* PENDING\_​DELIVERY\_​GROUPS

  The delivery group is in a pending state.

* PROVINCE\_​NOT\_​FOUND

  The given province cannot be found.

* SELLING\_​PLAN\_​NOT\_​APPLICABLE

  Selling plan is not applicable.

* SERVICE\_​UNAVAILABLE

  An error occurred while saving the cart.

* TOO\_​MANY\_​DELIVERY\_​ADDRESSES

  Too many delivery addresses on Cart.

* UNSPECIFIED\_​ADDRESS\_​ERROR

  A general error occurred during address validation.

* VALIDATION\_​CUSTOM

  Validation failed.

* VARIANT\_​REQUIRES\_​SELLING\_​PLAN

  Variant can only be purchased with a selling plan.

* ZIP\_​CODE\_​NOT\_​SUPPORTED

  The given zip code is unsupported.

***

## Fields

* [Cart​User​Error.code](https://shopify.dev/docs/api/storefront/latest/objects/CartUserError#field-CartUserError.fields.code)

  OBJECT

  Represents an error that happens during execution of a cart mutation.

***

## Map

### Fields with this enum

* [Cart​User​Error.code](https://shopify.dev/docs/api/storefront/latest/objects/CartUserError#field-CartUserError.fields.code)
