Skip to content
  1. Extras
  2. MiniShop3
  3. Development
  4. Web API
  5. Errors

Errors

Shape

json
{
  "success": false,
  "message": "…",
  "code": 400,
  "errors": null,
  "error_code": "bad_request"
}
FieldMeaning
codeHTTP status
errorsField map or null (key always present)
error_codeMachine code
dataOptional when passed

Error bodies always include an errors key (often null) and usually error_code. Some scenarios put validation fields in errors or in data.

Typical error_code

Examples from Response / ApiErrorCode: validation_failed, unauthorized, token_required, token_expired, token_invalid, not_found, conflict, rate_limited, business_rule, bad_request, forbidden, internal_error.

HTTP

StatusWhen
400Validation / bad request
401Missing / expired / invalid token
404Entity not found
409Conflict
429Rate limit
500Internal error

403 is less common on the storefront than 401/400. TypeScript client: union success | error with error_code and optional errors.

Rate limit

RateLimitMiddleware: settings ms3_rate_limit_max_attempts, ms3_rate_limit_decay_seconds. Exceeded → 429 / rate_limited.

See CORS and rate limit.