SDK errors
StorefrontApiError.retryAfterMs is a bounded millisecond delay parsed from a
valid Retry-After response header, or undefined when no usable delay was
provided. StorefrontClientStateError is a local preflight failure; for
example, CUSTOMER_AUTH_REQUIRED means no customer JWT was available and no
request was sent. StorefrontProtocolError.reason is EMPTY_RESPONSE or
INVALID_JSON when a successful response violates the SDK’s JSON contract.
Neither error retains response content, credentials, or secrets.
Do not log capability, JWT, receipt-token, authorization, or payment-secret values with an error.
Public error codes
Retry rules
Retry reads and explicitly retryable failures such asRATE_LIMITED or
DEPENDENCY_UNAVAILABLE with exponential backoff. Prefer retryAfterMs when
the API supplies it. Treat StorefrontProtocolError as an upstream contract or
edge-transformation failure, retain its method and route template for support,
and retry only when the underlying operation is safe. Never automatically
replay a cart mutation after CART_CONFLICT, and never invent a new idempotency
key while the outcome of an earlier write is unknown.
Manage Cart
See the revision and idempotency lifecycle.
REST API
Review authentication boundaries and required headers.