Error
●errors · /index·class
Base class for all structured commerce errors, providing a typed error code, HTTP status code, human-readable details, and a documentation help URL.
Subclasses set name, code, details, and description as class fields.
Signature
Example
class ProductNotFoundError extends Error<GenericErrorKind> {
name = 'ProductNotFoundError';
code = GenericErrorKind.NOT_FOUND;
details = 'Product not found';
description = 'No product exists for the given handle';
}
throw new ProductNotFoundError();Related
ApiErrorKind GenericErrorKind ApiError CartNotFoundError CartProviderError CartUserError ConvexOperatorTokenMintError DomainVerificationError