GitHub

ShopifyCartErrorCode

Type

import { ShopifyCartErrorCode } from '@daffodil/driver/shopify'

Error codes returned by CartUserError during cart mutations. Covers validation failures for addresses, quantities, delivery options, merchandise lines, discount codes, and metafields.

enum ShopifyCartErrorCode {
  AddressFieldContainsEmojis = ShopifyCartErrorCode.AddressFieldContainsEmojis,
  AddressFieldContainsHtmlTags = ShopifyCartErrorCode.AddressFieldContainsHtmlTags,
  AddressFieldContainsUrl = ShopifyCartErrorCode.AddressFieldContainsUrl,
  AddressFieldDoesNotMatchExpectedPattern = ShopifyCartErrorCode.AddressFieldDoesNotMatchExpectedPattern,
  AddressFieldIsRequired = ShopifyCartErrorCode.AddressFieldIsRequired,
  AddressFieldIsTooLong = ShopifyCartErrorCode.AddressFieldIsTooLong,
  Invalid = ShopifyCartErrorCode.Invalid,
  InvalidCompanyLocation = ShopifyCartErrorCode.InvalidCompanyLocation,
  InvalidDeliveryAddressId = ShopifyCartErrorCode.InvalidDeliveryAddressId,
  InvalidDeliveryGroup = ShopifyCartErrorCode.InvalidDeliveryGroup,
  InvalidDeliveryOption = ShopifyCartErrorCode.InvalidDeliveryOption,
  InvalidIncrement = ShopifyCartErrorCode.InvalidIncrement,
  InvalidMerchandiseLine = ShopifyCartErrorCode.InvalidMerchandiseLine,
  InvalidMetafields = ShopifyCartErrorCode.InvalidMetafields,
  InvalidPayment = ShopifyCartErrorCode.InvalidPayment,
  InvalidPaymentEmptyCart = ShopifyCartErrorCode.InvalidPaymentEmptyCart,
  InvalidZipCodeForCountry = ShopifyCartErrorCode.InvalidZipCodeForCountry,
  InvalidZipCodeForProvince = ShopifyCartErrorCode.InvalidZipCodeForProvince,
  LessThan = ShopifyCartErrorCode.LessThan,
  MaximumExceeded = ShopifyCartErrorCode.MaximumExceeded,
  MinimumNotMet = ShopifyCartErrorCode.MinimumNotMet,
  MissingCustomerAccessToken = ShopifyCartErrorCode.MissingCustomerAccessToken,
  MissingDiscountCode = ShopifyCartErrorCode.MissingDiscountCode,
  MissingNote = ShopifyCartErrorCode.MissingNote,
  NoteTooLong = ShopifyCartErrorCode.NoteTooLong,
  OnlyOneDeliveryAddressCanBeSelected = ShopifyCartErrorCode.OnlyOneDeliveryAddressCanBeSelected,
  PaymentsCreditCardBaseExpired = ShopifyCartErrorCode.PaymentsCreditCardBaseExpired,
  PaymentsCreditCardBaseGatewayNotSupported = ShopifyCartErrorCode.PaymentsCreditCardBaseGatewayNotSupported,
  PaymentsCreditCardGeneric = ShopifyCartErrorCode.PaymentsCreditCardGeneric,
  PaymentsCreditCardMonthInclusion = ShopifyCartErrorCode.PaymentsCreditCardMonthInclusion,
  PaymentsCreditCardNumberInvalid = ShopifyCartErrorCode.PaymentsCreditCardNumberInvalid,
  PaymentsCreditCardNumberInvalidFormat = ShopifyCartErrorCode.PaymentsCreditCardNumberInvalidFormat,
  PaymentsCreditCardVerificationValueBlank = ShopifyCartErrorCode.PaymentsCreditCardVerificationValueBlank,
  PaymentsCreditCardVerificationValueInvalidForCardType = ShopifyCartErrorCode.PaymentsCreditCardVerificationValueInvalidForCardType,
  PaymentsCreditCardYearExpired = ShopifyCartErrorCode.PaymentsCreditCardYearExpired,
  PaymentsCreditCardYearInvalidExpiryYear = ShopifyCartErrorCode.PaymentsCreditCardYearInvalidExpiryYear,
  PaymentMethodNotSupported = ShopifyCartErrorCode.PaymentMethodNotSupported,
  ProvinceNotFound = ShopifyCartErrorCode.ProvinceNotFound,
  TooManyDeliveryAddresses = ShopifyCartErrorCode.TooManyDeliveryAddresses,
  UnspecifiedAddressError = ShopifyCartErrorCode.UnspecifiedAddressError,
  ValidationCustom = ShopifyCartErrorCode.ValidationCustom,
  ZipCodeNotSupported = ShopifyCartErrorCode.ZipCodeNotSupported,
}

Properties

AddressFieldContainsEmojis
ShopifyCartErrorCode.AddressFieldContainsEmojis

The specified address field contains emojis.

AddressFieldContainsHtmlTags
ShopifyCartErrorCode.AddressFieldContainsHtmlTags

The specified address field contains HTML tags.

AddressFieldContainsUrl
ShopifyCartErrorCode.AddressFieldContainsUrl

The specified address field contains a URL.

AddressFieldDoesNotMatchExpectedPattern
ShopifyCartErrorCode.AddressFieldDoesNotMatchExpectedPattern

The specified address field does not match the expected pattern.

AddressFieldIsRequired
ShopifyCartErrorCode.AddressFieldIsRequired

The specified address field is required.

AddressFieldIsTooLong
ShopifyCartErrorCode.AddressFieldIsTooLong

The specified address field is too long.

Invalid
ShopifyCartErrorCode.Invalid

The input value is invalid.

InvalidCompanyLocation
ShopifyCartErrorCode.InvalidCompanyLocation

Company location not found or not allowed.

InvalidDeliveryAddressId
ShopifyCartErrorCode.InvalidDeliveryAddressId

The delivery address was not found.

InvalidDeliveryGroup
ShopifyCartErrorCode.InvalidDeliveryGroup

Delivery group was not found in cart.

InvalidDeliveryOption
ShopifyCartErrorCode.InvalidDeliveryOption

Delivery option was not valid.

InvalidIncrement
ShopifyCartErrorCode.InvalidIncrement

The quantity must be a multiple of the specified increment.

InvalidMerchandiseLine
ShopifyCartErrorCode.InvalidMerchandiseLine

Merchandise line was not found in cart.

InvalidMetafields
ShopifyCartErrorCode.InvalidMetafields

The metafields were not valid.

InvalidPayment
ShopifyCartErrorCode.InvalidPayment

The payment wasn't valid.

InvalidPaymentEmptyCart
ShopifyCartErrorCode.InvalidPaymentEmptyCart

Cannot update payment on an empty cart

InvalidZipCodeForCountry
ShopifyCartErrorCode.InvalidZipCodeForCountry

The given zip code is invalid for the provided country.

InvalidZipCodeForProvince
ShopifyCartErrorCode.InvalidZipCodeForProvince

The given zip code is invalid for the provided province.

LessThan
ShopifyCartErrorCode.LessThan

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

MaximumExceeded
ShopifyCartErrorCode.MaximumExceeded

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

MinimumNotMet
ShopifyCartErrorCode.MinimumNotMet

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

MissingCustomerAccessToken
ShopifyCartErrorCode.MissingCustomerAccessToken

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

MissingDiscountCode
ShopifyCartErrorCode.MissingDiscountCode

Missing discount code.

MissingNote
ShopifyCartErrorCode.MissingNote

Missing note.

NoteTooLong
ShopifyCartErrorCode.NoteTooLong

The note length must be below the specified maximum.

OnlyOneDeliveryAddressCanBeSelected
ShopifyCartErrorCode.OnlyOneDeliveryAddressCanBeSelected

Only one delivery address can be selected.

PaymentsCreditCardBaseExpired
ShopifyCartErrorCode.PaymentsCreditCardBaseExpired

Credit card has expired.

PaymentsCreditCardBaseGatewayNotSupported
ShopifyCartErrorCode.PaymentsCreditCardBaseGatewayNotSupported

Credit card gateway is not supported.

PaymentsCreditCardGeneric
ShopifyCartErrorCode.PaymentsCreditCardGeneric

Credit card error.

PaymentsCreditCardMonthInclusion
ShopifyCartErrorCode.PaymentsCreditCardMonthInclusion

Credit card month is invalid.

PaymentsCreditCardNumberInvalid
ShopifyCartErrorCode.PaymentsCreditCardNumberInvalid

Credit card number is invalid.

PaymentsCreditCardNumberInvalidFormat
ShopifyCartErrorCode.PaymentsCreditCardNumberInvalidFormat

Credit card number format is invalid.

PaymentsCreditCardVerificationValueBlank
ShopifyCartErrorCode.PaymentsCreditCardVerificationValueBlank

Credit card verification value is blank.

PaymentsCreditCardVerificationValueInvalidForCardType
ShopifyCartErrorCode.PaymentsCreditCardVerificationValueInvalidForCardType

Credit card verification value is invalid for card type.

PaymentsCreditCardYearExpired
ShopifyCartErrorCode.PaymentsCreditCardYearExpired

Credit card has expired.

PaymentsCreditCardYearInvalidExpiryYear
ShopifyCartErrorCode.PaymentsCreditCardYearInvalidExpiryYear

Credit card expiry year is invalid.

PaymentMethodNotSupported
ShopifyCartErrorCode.PaymentMethodNotSupported

The payment method is not supported.

ProvinceNotFound
ShopifyCartErrorCode.ProvinceNotFound

The given province cannot be found.

TooManyDeliveryAddresses
ShopifyCartErrorCode.TooManyDeliveryAddresses

Too many delivery addresses on Cart.

UnspecifiedAddressError
ShopifyCartErrorCode.UnspecifiedAddressError

A general error occurred during address validation.

ValidationCustom
ShopifyCartErrorCode.ValidationCustom

Validation failed.

ZipCodeNotSupported
ShopifyCartErrorCode.ZipCodeNotSupported

The given zip code is unsupported.