CartUserErrorEntry
●cart · /core·type
A single field-scoped validation error returned by the upstream provider.
Consumers display these to users; field is undefined when the error is
not attributable to a specific input field.
Properties
PROPTYPEDESCRIPTION
message
string
field?
string
Example
const entries: CartUserErrorEntry[] = [
{ field: 'discountCode', message: 'Code has expired' },
];
throw new CartUserError(entries);Related
RunCartAdapterContractOpts runCartAdapterContract CartCapabilityUnsupportedError CartError CartNotFoundError CartProviderError CartUserError CartAdapter
MetadataOpen in GitHub ↗
CartProviderError
Thrown for transport / upstreamAPI failures (network, 5xx, malformed payloads). Retry middleware treats this as retryable.
CartUserError
Thrown when the upstream provider rejects a mutation due to callersupplied input (e.g. invalid discount code, quantity exceeds stock). Retry middleware does NOT