Packages narrative
packages / errors

errors

Functions

NameDescription
getAllErrorCodesReturns all error code string values across every enum in
getErrorFromCodeMaps a

Classes

NameDescription
ApiErrorBase class for all API-layer errors, defaulting to HTTP 500 and the
CartNotFoundErrorSignals that the requested cart could not be located by its identifier, returning HTTP 404.
CartProviderErrorSignals that the upstream cart provider returned an unexpected error, returning HTTP 502.
CartUserErrorSignals that the cart provider rejected the mutation with one or more user-facing validation errors, returning HTTP 400.
ConvexOperatorTokenMintErrorSignals 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 (
DomainVerificationErrorA customer-facing domain is not yet pointed at the platform: neither the storefront's Vercel project nor
DuplicateContextDirectiveErrorSignals that a Shopify GraphQL operation already declares an
DuplicateContextVariableErrorSignals that a Shopify GraphQL operation pre-declares a reserved context variable (
DuplicatePredicateRegistrationErrorSignals that a tenant predicate with the same name was registered more than once.
DuplicateWorkspaceSlugErrorSignals that a workspace slug is registered more than once, violating the global-uniqueness constraint across all apps and packages.
EmptyTenantScopeErrorSignals that a tenant-scoped query received an empty shop ID, preventing the predicate from being applied correctly.
EmptyUploadFileErrorSignals that the uploaded file exists but is empty (zero bytes), returning HTTP 400.
ErrorBase class for all structured commerce errors, providing a typed error code, HTTP status code, human-readable details, and a documentation help URL. Subclasses set
GenericErrorBase class for application-layer errors not specific to the API surface, defaulting to HTTP 500.
ImageNoFractionalErrorSignals that a fractional (non-integer)
ImageOutOfBoundsErrorSignals that
InvalidCartErrorSignals that the cart token or structure is invalid, returning HTTP 404.
InvalidHandleErrorSignals that a Shopify resource handle is missing, malformed, or resolves to no resource, returning HTTP 404.
InvalidIDErrorSignals that an entity ID is missing, malformed, or resolves to no entity, returning HTTP 404.
InvalidShopDomainErrorSignals that the supplied shop domain string is malformed or otherwise invalid, returning HTTP 400.
InvalidShopErrorSignals that the resolved shop record is structurally invalid, returning HTTP 400.
InvalidShopifyCustomerAccountsApiConfigurationSignals that the Shopify Customer Account API credentials or configuration are invalid or missing, returning HTTP 500.
LocalizedCompositeFieldErrorSignals that a CMS field descriptor declares
MalformedFormPayloadErrorSignals that an incoming form payload could not be parsed or fails structural validation, returning HTTP 400.
MediaStorageUploadErrorSignals that POSTing bytes to a Convex file-storage upload URL failed (non-2xx response or a response without a
MethodNotAllowedErrorSignals that the HTTP method used is not supported by the endpoint, returning HTTP 405.
MissingContextProviderErrorSignals that a React hook or context consumer was used outside its required provider, producing a descriptive message.
MissingConvexBridgeErrorSignals 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.
MissingEnvironmentVariableErrorSignals that a required environment variable is absent at runtime, returning HTTP 500.
MissingListConfigErrorSignals that the CMS editor manifest for a collection does not include a list view configuration.
MissingRequestContextErrorSignals that code requiring an active request scope was called outside of one.
MissingRequiredFieldErrorSignals that a required field is absent in the incoming payload, returning HTTP 400.
MissingSessionUserIdErrorSignals that an authenticated session is missing a user ID, indicating a misconfigured auth adapter or JWT/session callback.
MissingTenantForScopedCollectionErrorSignals that a tenant-scoped collection was queried without a tenant context being present.
MissingTypeDocOutputErrorSignals that no TypeDoc JSON output was found for the requested subpath, typically because the build has not been run.
MissingUploadFileErrorSignals that an upload request contains no attached file, returning HTTP 400.
NoLocaleResolvableErrorSignals that no locale could be resolved for the request and the shop has no default locale configured, returning HTTP 500.
NoLocalesAvailableErrorSignals that the shop has no locales configured, making it impossible to serve any request, returning HTTP 500.
NotConnectedToDatabaseSignals that a database operation was attempted on an instance without an active connection.
NotFoundErrorSignals that a requested resource could not be located, returning HTTP 404.
ProviderFetchErrorSignals that a fetch from an external data provider failed, returning HTTP 500.
ShopMisconfigurationErrorSignals that a shop record is present but missing required configuration fields, returning HTTP 500.
TodoErrorPlaceholder error for code paths that are not yet implemented, returning HTTP 404.
TooManyRequestsErrorSignals that the client has exceeded the rate limit, returning HTTP 429.
TypeErrorSignals that a value of an unexpected type was passed to a function or operation.
UnknownCollectionSlugErrorSignals that no collection is registered under the given slug in the CMS manifest, returning HTTP 500.
UnknownCommerceProviderErrorSignals that no commerce provider is registered for the requested provider type.
UnknownErrorSignals an unexpected or unclassified API error with no further context.
UnknownLocaleErrorSignals that the locale code supplied by the request is not supported or cannot be parsed, returning HTTP 404 by default.
UnknownShopDomainErrorSignals that no shop record could be matched to the given hostname, returning HTTP 404 by default.
UnknownShopIdErrorSignals that no shop record could be found for the given internal shop ID, returning HTTP 404.
UnreachableErrorSignals that a supposedly unreachable code path was executed, indicating a logic error or exhaustiveness gap.
UnsupportedUploadMimeTypeErrorSignals that an uploaded file's mime type is outside the media allowlist (any image, mp4 video, or PDF), returning HTTP 415.

Variables

NameDescription
ERROR_KINDSThe single registry of error-code enums.

Enums

NameDescription
ApiErrorKindError codes for all API-layer errors raised during shop resolution, commerce-provider calls, cart operations, and request handling.
GenericErrorKindError codes for non-API, application-layer errors covering unclassified failures, type violations, context misuse, and CMS configuration issues.

On this page