details.codeis the code to branch on. For a400, it is the first error’s code. For a409, it is the first conflict code.details.errors(when present) lists every problem as{ path, code, detail? }.pathpoints at the field, for examplelines.0.quantityorshippingAddress.postalCode. Use it to show messages next to the right input.WEAK_PASSWORDaddsdetails.reason.- A
403from a wrong token has nodetails.code. - While the e-commerce module is off, every route answers
404with nodetails.code. - A
500carries no details.
Status Codes
Retries
401: drop the dead cookie (SESSION_INVALIDorCUSTOMER_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. RetryVERIFICATION_CONFLICTandIDEMPOTENCY_KEY_CONFLICTas they are.429: wait theRetry-Afterseconds (also indetails.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 validX-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.