Error codes
Every error has the same shape. type groups codes; code is stable and safe to match on; message is for people; param names the field at fault; docs links here.
{
"error": {
"type": "invalid_request",
"code": "validation_failed",
"message": "Title is required.",
"param": "title",
"trace_id": "tr_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
"docs": "https://docs.storelyne.com/errors/validation_failed"
}
}
invalid_request
authentication_error
permission_error
| Code | Status | Meaning |
|---|
missing_scope | 403 | The app token does not have the scope this endpoint needs. |
session_required | 403 | This endpoint needs a seller session; app tokens cannot call it. |
forbidden | 403 | You do not have access to this resource. |
not_a_member | 403 | You are not a member of this store, or your role cannot do this. |
csrf_failed | 403 | The X-CSRF-Token header is missing or does not match. Reload the page and try again. |
step_up_required | 403 | Confirm with a fresh authenticator code before doing this. |
not_found
conflict
| Code | Status | Meaning |
|---|
email_taken | 409 | An account with this email already exists. Sign in instead. |
conflict | 409 | The request conflicts with the current state of the object. |
retry_conflict | 409 | A concurrent change got there first. Retry the request. |
out_of_stock | 409 | An item does not have enough stock for this quantity. Lower the quantity or remove it. |
checkout_closed | 409 | This checkout is already completed or expired. Start again from the cart. |
price_changed | 409 | A price changed since the checkout started. Review the new total and place the order again. |
idempotency_error
rate_limit_error
| Code | Status | Meaning |
|---|
login_throttled | 429 | Too many failed sign-in attempts. Wait and try again. |
ops_locked | 429 | This staff account is locked after repeated failures. Wait and try again. |
rate_limited | 429 | Too many requests. Wait for the time in RateLimit-Reset. |
api_error
| Code | Status | Meaning |
|---|
internal_error | 500 | Something went wrong on our side. Quote the trace_id to support. |
service_unavailable | 503 | A dependency is unavailable. Retry with backoff. |
server_agent_unavailable | 503 | The server agent is not running, so the super admin cannot reach the server. It is installed by the next deploy. |
server_action_failed | 502 | The server agent tried the action and it failed. The message says what the server answered. |
database_timeout | 503 | The request took too long. Retry with backoff. |