import { CartErrorCode } from '@daffodil/driver/shopify'
Possible error codes that can be returned by CartUserError
.
enum CartErrorCode {
AddressFieldContainsEmojis = CartErrorCode.AddressFieldContainsEmojis,
AddressFieldContainsHtmlTags = CartErrorCode.AddressFieldContainsHtmlTags,
AddressFieldContainsUrl = CartErrorCode.AddressFieldContainsUrl,
AddressFieldDoesNotMatchExpectedPattern = CartErrorCode.AddressFieldDoesNotMatchExpectedPattern,
AddressFieldIsRequired = CartErrorCode.AddressFieldIsRequired,
AddressFieldIsTooLong = CartErrorCode.AddressFieldIsTooLong,
Invalid = CartErrorCode.Invalid,
InvalidCompanyLocation = CartErrorCode.InvalidCompanyLocation,
InvalidDeliveryGroup = CartErrorCode.InvalidDeliveryGroup,
InvalidDeliveryOption = CartErrorCode.InvalidDeliveryOption,
InvalidIncrement = CartErrorCode.InvalidIncrement,
InvalidMerchandiseLine = CartErrorCode.InvalidMerchandiseLine,
InvalidMetafields = CartErrorCode.InvalidMetafields,
InvalidPayment = CartErrorCode.InvalidPayment,
InvalidPaymentEmptyCart = CartErrorCode.InvalidPaymentEmptyCart,
InvalidZipCodeForCountry = CartErrorCode.InvalidZipCodeForCountry,
InvalidZipCodeForProvince = CartErrorCode.InvalidZipCodeForProvince,
LessThan = CartErrorCode.LessThan,
MaximumExceeded = CartErrorCode.MaximumExceeded,
MinimumNotMet = CartErrorCode.MinimumNotMet,
MissingCustomerAccessToken = CartErrorCode.MissingCustomerAccessToken,
MissingDiscountCode = CartErrorCode.MissingDiscountCode,
MissingNote = CartErrorCode.MissingNote,
PaymentMethodNotSupported = CartErrorCode.PaymentMethodNotSupported,
ProvinceNotFound = CartErrorCode.ProvinceNotFound,
UnspecifiedAddressError = CartErrorCode.UnspecifiedAddressError,
ValidationCustom = CartErrorCode.ValidationCustom,
ZipCodeNotSupported = CartErrorCode.ZipCodeNotSupported,
}
AddressFieldContainsEmojis CartErrorCode.AddressFieldContainsEmojis |
---|
The specified address field contains emojis. |
AddressFieldContainsHtmlTags CartErrorCode.AddressFieldContainsHtmlTags |
---|
The specified address field contains HTML tags. |
AddressFieldContainsUrl CartErrorCode.AddressFieldContainsUrl |
---|
The specified address field contains a URL. |
AddressFieldDoesNotMatchExpectedPattern CartErrorCode.AddressFieldDoesNotMatchExpectedPattern |
---|
The specified address field does not match the expected pattern. |
AddressFieldIsRequired CartErrorCode.AddressFieldIsRequired |
---|
The specified address field is required. |
AddressFieldIsTooLong CartErrorCode.AddressFieldIsTooLong |
---|
The specified address field is too long. |
Invalid CartErrorCode.Invalid |
---|
The input value is invalid. |
InvalidCompanyLocation CartErrorCode.InvalidCompanyLocation |
---|
Company location not found or not allowed. |
InvalidDeliveryGroup CartErrorCode.InvalidDeliveryGroup |
---|
Delivery group was not found in cart. |
InvalidDeliveryOption CartErrorCode.InvalidDeliveryOption |
---|
Delivery option was not valid. |
InvalidIncrement CartErrorCode.InvalidIncrement |
---|
The quantity must be a multiple of the specified increment. |
InvalidMerchandiseLine CartErrorCode.InvalidMerchandiseLine |
---|
Merchandise line was not found in cart. |
InvalidMetafields CartErrorCode.InvalidMetafields |
---|
The metafields were not valid. |
InvalidPayment CartErrorCode.InvalidPayment |
---|
The payment wasn't valid. |
InvalidPaymentEmptyCart CartErrorCode.InvalidPaymentEmptyCart |
---|
Cannot update payment on an empty cart |
InvalidZipCodeForCountry CartErrorCode.InvalidZipCodeForCountry |
---|
The given zip code is invalid for the provided country. |
InvalidZipCodeForProvince CartErrorCode.InvalidZipCodeForProvince |
---|
The given zip code is invalid for the provided province. |
LessThan CartErrorCode.LessThan |
---|
The input value should be less than the maximum value allowed. |
MaximumExceeded CartErrorCode.MaximumExceeded |
---|
The quantity must be below the specified maximum for the item. |
MinimumNotMet CartErrorCode.MinimumNotMet |
---|
The quantity must be above the specified minimum for the item. |
MissingCustomerAccessToken CartErrorCode.MissingCustomerAccessToken |
---|
The customer access token is required when setting a company location. |
MissingDiscountCode CartErrorCode.MissingDiscountCode |
---|
Missing discount code. |
MissingNote CartErrorCode.MissingNote |
---|
Missing note. |
PaymentMethodNotSupported CartErrorCode.PaymentMethodNotSupported |
---|
The payment method is not supported. |
ProvinceNotFound CartErrorCode.ProvinceNotFound |
---|
The given province cannot be found. |
UnspecifiedAddressError CartErrorCode.UnspecifiedAddressError |
---|
A general error occurred during address validation. |
ValidationCustom CartErrorCode.ValidationCustom |
---|
Validation failed. |
ZipCodeNotSupported CartErrorCode.ZipCodeNotSupported |
---|
The given zip code is unsupported. |