Skip to main content
A request that was not carried out answers with success: false, a status in the 400s or 500s, and a code.
Read code, not message. The message is written for a person and can be reworded. The code stays.

What was wrong with a field

validation_failed says what is wrong with each field, under errors, by the field’s name. A field inside a list is named by its place: variants.0.price.
Show these to whoever typed the values. Each says which rule was broken.

Statuses

Codes on every route

Codes of a route’s own

A route refuses for reasons of its own with a code of its own, and its page says which. Some you will meet: Limits answer 422 with a code that ends in _limit, and a message that says the limit.

What to try again

Try again after a 429, once Retry-After has passed, and after a 500 or above, with a pause that grows. Send an Idempotency-Key with a change, so that trying again cannot do it twice. Do not try a 4xx again as it is. It will be refused the same way until the request is changed. If a 5xx keeps coming back, look at status.shoply.gg.