Reference
Errors
When Slurry itself refuses a request, it answers with one envelope, everywhere. When the simulated API fails on purpose, it answers the way that API would.
The envelope
The management API and every simulation host use the same body when Slurry is the one speaking. type is always slurry_error, docs_url links to the row for that code on this page, and request_id identifies the request in our logs. On simulation hosts the x-slurry-error header carries the code as well.
{
"error": {
"type": "slurry_error",
"code": "ip_not_allowed",
"message": "Requests from 203.0.113.9 are not on this simulation's IP allow-list",
"docs_url": "https://slurry.io/docs/errors#ip_not_allowed",
"request_id": "req_01J8Z6Q4M2V7K3T9"
}
}Slurry error or simulated vendor error?
Errors produced by your rules, scenarios or Slurry-Force are part of the simulation: they use the error schema from the API's spec where it has one, never set type: slurry_error and never send x-slurry-error. Where the spec defines no error schema, the body is a neutral one like this:
{
"error": {
"status": 503,
"message": "Simulated failure"
}
}So a client can branch on one check: if x-slurry-error is present, Slurry refused the request; otherwise the simulated API answered.
Management API codes
| Code | Status | When |
|---|---|---|
invalid_request | 400 | The body or query failed validation. The message names the field. |
bad_request | 400 | The request made sense but cannot be done, for example an invalid CIDR range. |
unsafe_url | 400 | A webhook URL points at a private or internal address. |
unauthorised | 401 | Missing, invalid, revoked or expired account key. |
insufficient_scope | 403 | The key lacks the scope this endpoint needs (simulations:read or simulations:write). |
ip_not_allowed | 403 | The account key is restricted to IP ranges that do not include the caller. |
account_suspended | 403 | The account is suspended pending review. |
suspended | 403 | The simulation or account is suspended, so this change is refused. |
payment_required | 402 | No active subscription. |
plan_limit | 402 | Creating this would exceed your plan (simulations or concurrent forks). |
storage_limit | 402 | Records across simulations, forks and snapshots would exceed your plan. |
no_credit | 402 | Your monthly AI allowance and prepaid credit are used up and no model key is set. |
model_rate_limited | 429 | Too many model calls in the last hour. Try later or use your own model key. |
rate_limited | 429 | Too many management API requests. Honour Retry-After. |
not_found | 404 | No such simulation, snapshot, rule or library entry in your account. |
conflict | 409 | The name or subdomain is taken, or the simulation is in a state that does not allow this yet. |
idempotency_in_progress | 409 | A request with the same Idempotency-Key is still running. Retry shortly. |
idempotency_key_reused | 422 | The Idempotency-Key was already used with a different request body. |
invalid_spec | 422 | The uploaded spec could not be parsed. |
invalid_rule | 422 | A rule or behaviour step does not fit the data model. |
content_blocked | 422 | Uploaded content was refused by review under the Acceptable Use Policy. |
moderation_unavailable | 503 | Content review could not run. The content is held, not published; try again shortly. |
capacity_unavailable | 503 | Hosted model generation is temporarily at capacity. Try later or use your own model key. |
generation_unavailable | 503 | Hosted model generation is switched off for now. Use your own model key. |
internal | 500 | Something failed on our side. Quote the request_id to support. |
Simulation host codes
| Code | Status | When |
|---|---|---|
simulation_not_found | 404 | No simulation lives at this hostname or path. |
invalid_api_key | 401 | Missing or wrong simulation key. |
ip_not_allowed | 403 | The calling address is not on the allow-list. The message shows the address Slurry saw. |
simulation_suspended | 403 | Stopped by abuse monitoring or an administrator. |
fork_expired | 410 | The fork passed its expiry time. |
subscription_inactive | 402 | The owning account has no active plan. |
monthly_quota | 429 | The account used its monthly request allowance. |
rate_limited | 429 | Over a per-minute limit, on a simulation or the management API. Honour Retry-After. |
simulation_paused | 503 | Paused by its owner. |
simulation_not_ready | 503 | Still being analysed or seeded. |
simulation_pending_review | 503 | Waiting for content review before going live. |
no_such_operation | 404 | The method and path are not in this API’s spec. |
malformed_path | 400 | The path could not be decoded. |
record_limit | 409 | A create would take the simulation over its plan’s records limit. Not retryable: delete records or upgrade. |
engine_error | 500 | The engine failed while handling the request. |