CartUserError
●cart · /core·class
Thrown when the upstream provider rejects a mutation due to caller-supplied input (e.g. invalid discount code, quantity exceeds stock). Retry middleware does NOT retry these.
Signature
Example
if (response.userErrors.length > 0) {
throw new CartUserError(response.userErrors);
}Related
RunCartAdapterContractOpts runCartAdapterContract CartCapabilityUnsupportedError CartError CartNotFoundError CartProviderError CartAdapter CartEventBus
MetadataOpen in GitHub ↗
CartUserErrorEntry
A single fieldscoped validation error returned by the upstream provider. Consumers display these to users; field is undefined when the error is not attributable
Cart
Full cart state returned by the kernel after every read or mutation. The TExt generic carries providerspecific extensions added by the adapter. Treat this value