Skip to content

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.

403 Forbidden
{
  "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:

simulated 503
{
  "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

CodeStatusWhen
invalid_request400The body or query failed validation. The message names the field.
bad_request400The request made sense but cannot be done, for example an invalid CIDR range.
unsafe_url400A webhook URL points at a private or internal address.
unauthorised401Missing, invalid, revoked or expired account key.
insufficient_scope403The key lacks the scope this endpoint needs (simulations:read or simulations:write).
ip_not_allowed403The account key is restricted to IP ranges that do not include the caller.
account_suspended403The account is suspended pending review.
suspended403The simulation or account is suspended, so this change is refused.
payment_required402No active subscription.
plan_limit402Creating this would exceed your plan (simulations or concurrent forks).
storage_limit402Records across simulations, forks and snapshots would exceed your plan.
no_credit402Your monthly AI allowance and prepaid credit are used up and no model key is set.
model_rate_limited429Too many model calls in the last hour. Try later or use your own model key.
rate_limited429Too many management API requests. Honour Retry-After.
not_found404No such simulation, snapshot, rule or library entry in your account.
conflict409The name or subdomain is taken, or the simulation is in a state that does not allow this yet.
idempotency_in_progress409A request with the same Idempotency-Key is still running. Retry shortly.
idempotency_key_reused422The Idempotency-Key was already used with a different request body.
invalid_spec422The uploaded spec could not be parsed.
invalid_rule422A rule or behaviour step does not fit the data model.
content_blocked422Uploaded content was refused by review under the Acceptable Use Policy.
moderation_unavailable503Content review could not run. The content is held, not published; try again shortly.
capacity_unavailable503Hosted model generation is temporarily at capacity. Try later or use your own model key.
generation_unavailable503Hosted model generation is switched off for now. Use your own model key.
internal500Something failed on our side. Quote the request_id to support.

Simulation host codes

CodeStatusWhen
simulation_not_found404No simulation lives at this hostname or path.
invalid_api_key401Missing or wrong simulation key.
ip_not_allowed403The calling address is not on the allow-list. The message shows the address Slurry saw.
simulation_suspended403Stopped by abuse monitoring or an administrator.
fork_expired410The fork passed its expiry time.
subscription_inactive402The owning account has no active plan.
monthly_quota429The account used its monthly request allowance.
rate_limited429Over a per-minute limit, on a simulation or the management API. Honour Retry-After.
simulation_paused503Paused by its owner.
simulation_not_ready503Still being analysed or seeded.
simulation_pending_review503Waiting for content review before going live.
no_such_operation404The method and path are not in this API’s spec.
malformed_path400The path could not be decoded.
record_limit409A create would take the simulation over its plan’s records limit. Not retryable: delete records or upgrade.
engine_error500The engine failed while handling the request.