Skip to main content
Every error uses Strapi’s error format:
  • details.code is the code to branch on. For a 400, it is the first error’s code. For a 409, it is the first conflict code.
  • details.errors (when present) lists every problem as { path, code, detail? }. path points at the field, for example lines.0.quantity or shippingAddress.postalCode. Use it to show messages next to the right input.
  • WEAK_PASSWORD adds details.reason.
  • A 403 from a wrong token has no details.code.
  • While the e-commerce module is off, every route answers 404 with no details.code.
  • A 500 carries no details.

Status Codes

Retries

  • 401: drop the dead cookie (SESSION_INVALID or CUSTOMER_SESSION_INVALID), open a new session when needed, and repeat the call once. Never repeat an order on a new session.
  • 409: re-read the data (quote, store credit, status) and show the change. Retry VERIFICATION_CONFLICT and IDEMPOTENCY_KEY_CONFLICT as they are.
  • 429: wait the Retry-After seconds (also in details.retryAfter). Tell the customer to try again later.
  • 502: a provider failed. Retry a few times with a growing delay. For orders, keep the same idempotency key.
  • 503: a setup problem on the store. Show a friendly message and alert the store owner. Retrying does not help.

Rate Limits

Strapi counts requests in fixed windows, per rule and per dimension: per session, per client IP (only with a valid X-Storefront-Client-IP) and per email (normalized and hashed, never stored in clear). A request counts only when every dimension allows it, so a request refused by one limit spends nothing in the others. Over a limit, Strapi answers 429 with a Retry-After header and details: { code: "RATE_LIMITED", retryAfter }. Password hashing also has a small queue on the server: when it is full, account routes answer 429 RATE_LIMITED with a short Retry-After.
The counters live in memory on the Strapi process. They are exact only with a single Strapi instance, and they reset when Strapi restarts.