Packages narrative
packages / errors
errors
Functions
| Name | Description |
|---|---|
getAllErrorCodes | Returns all error code string values across every enum in |
getErrorFromCode | Maps a |
Classes
| Name | Description |
|---|---|
ApiError | Base class for all API-layer errors, defaulting to HTTP 500 and the |
CartNotFoundError | Signals that the requested cart could not be located by its identifier, returning HTTP 404. |
CartProviderError | Signals that the upstream cart provider returned an unexpected error, returning HTTP 502. |
CartUserError | Signals that the cart provider rejected the mutation with one or more user-facing validation errors, returning HTTP 400. |
ConvexOperatorTokenMintError | Signals that an identity-authenticated Convex call could not obtain an operator bearer token — either the server-side session has no authenticated operator or the RS256 minting material ( |
DomainVerificationError | A customer-facing domain is not yet pointed at the platform: neither the storefront's Vercel project nor |
DuplicateContextDirectiveError | Signals that a Shopify GraphQL operation already declares an |
DuplicateContextVariableError | Signals that a Shopify GraphQL operation pre-declares a reserved context variable ( |
DuplicatePredicateRegistrationError | Signals that a tenant predicate with the same name was registered more than once. |
DuplicateWorkspaceSlugError | Signals that a workspace slug is registered more than once, violating the global-uniqueness constraint across all apps and packages. |
EmptyTenantScopeError | Signals that a tenant-scoped query received an empty shop ID, preventing the predicate from being applied correctly. |
EmptyUploadFileError | Signals that the uploaded file exists but is empty (zero bytes), returning HTTP 400. |
Error | 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 |
GenericError | Base class for application-layer errors not specific to the API surface, defaulting to HTTP 500. |
ImageNoFractionalError | Signals that a fractional (non-integer) |
ImageOutOfBoundsError | Signals that |
InvalidCartError | Signals that the cart token or structure is invalid, returning HTTP 404. |
InvalidHandleError | Signals that a Shopify resource handle is missing, malformed, or resolves to no resource, returning HTTP 404. |
InvalidIDError | Signals that an entity ID is missing, malformed, or resolves to no entity, returning HTTP 404. |
InvalidShopDomainError | Signals that the supplied shop domain string is malformed or otherwise invalid, returning HTTP 400. |
InvalidShopError | Signals that the resolved shop record is structurally invalid, returning HTTP 400. |
InvalidShopifyCustomerAccountsApiConfiguration | Signals that the Shopify Customer Account API credentials or configuration are invalid or missing, returning HTTP 500. |
LocalizedCompositeFieldError | Signals that a CMS field descriptor declares |
MalformedFormPayloadError | Signals that an incoming form payload could not be parsed or fails structural validation, returning HTTP 400. |
MediaStorageUploadError | Signals that POSTing bytes to a Convex file-storage upload URL failed (non-2xx response or a response without a |
MethodNotAllowedError | Signals that the HTTP method used is not supported by the endpoint, returning HTTP 405. |
MissingContextProviderError | Signals that a React hook or context consumer was used outside its required provider, producing a descriptive message. |
MissingConvexBridgeError | Signals that a CMS editor server action ran against a runtime with no Convex bridge wired, so the action cannot reach its Convex-backed document mutations. |
MissingEnvironmentVariableError | Signals that a required environment variable is absent at runtime, returning HTTP 500. |
MissingListConfigError | Signals that the CMS editor manifest for a collection does not include a list view configuration. |
MissingRequestContextError | Signals that code requiring an active request scope was called outside of one. |
MissingRequiredFieldError | Signals that a required field is absent in the incoming payload, returning HTTP 400. |
MissingSessionUserIdError | Signals that an authenticated session is missing a user ID, indicating a misconfigured auth adapter or JWT/session callback. |
MissingTenantForScopedCollectionError | Signals that a tenant-scoped collection was queried without a tenant context being present. |
MissingTypeDocOutputError | Signals that no TypeDoc JSON output was found for the requested subpath, typically because the build has not been run. |
MissingUploadFileError | Signals that an upload request contains no attached file, returning HTTP 400. |
NoLocaleResolvableError | Signals that no locale could be resolved for the request and the shop has no default locale configured, returning HTTP 500. |
NoLocalesAvailableError | Signals that the shop has no locales configured, making it impossible to serve any request, returning HTTP 500. |
NotConnectedToDatabase | Signals that a database operation was attempted on an instance without an active connection. |
NotFoundError | Signals that a requested resource could not be located, returning HTTP 404. |
ProviderFetchError | Signals that a fetch from an external data provider failed, returning HTTP 500. |
ShopMisconfigurationError | Signals that a shop record is present but missing required configuration fields, returning HTTP 500. |
TodoError | Placeholder error for code paths that are not yet implemented, returning HTTP 404. |
TooManyRequestsError | Signals that the client has exceeded the rate limit, returning HTTP 429. |
TypeError | Signals that a value of an unexpected type was passed to a function or operation. |
UnknownCollectionSlugError | Signals that no collection is registered under the given slug in the CMS manifest, returning HTTP 500. |
UnknownCommerceProviderError | Signals that no commerce provider is registered for the requested provider type. |
UnknownError | Signals an unexpected or unclassified API error with no further context. |
UnknownLocaleError | Signals that the locale code supplied by the request is not supported or cannot be parsed, returning HTTP 404 by default. |
UnknownShopDomainError | Signals that no shop record could be matched to the given hostname, returning HTTP 404 by default. |
UnknownShopIdError | Signals that no shop record could be found for the given internal shop ID, returning HTTP 404. |
UnreachableError | Signals that a supposedly unreachable code path was executed, indicating a logic error or exhaustiveness gap. |
UnsupportedUploadMimeTypeError | Signals that an uploaded file's mime type is outside the media allowlist (any image, mp4 video, or PDF), returning HTTP 415. |
Variables
| Name | Description |
|---|---|
ERROR_KINDS | The single registry of error-code enums. |
Enums
| Name | Description |
|---|---|
ApiErrorKind | Error codes for all API-layer errors raised during shop resolution, commerce-provider calls, cart operations, and request handling. |
GenericErrorKind | Error codes for non-API, application-layer errors covering unclassified failures, type violations, context misuse, and CMS configuration issues. |
ValueKind
The kind of value a theme token holds, driving which admin control renders for it. color → swatch + hex/CSS text; dimension → freetext (rem/px/%/aspect/shadow/d
ApiErrorKind
Error codes for all APIlayer errors raised during shop resolution, commerceprovider calls, cart operations, and request handling.