QuantaAPI
Dashboard
Reference

Errors

How mock endpoints report failures, and how to react to each status.

Status and codes
3 min read

A mock endpoint answers with whatever your response template renders. The status code is the part you can rely on; the body shape is entirely up to you.

Mock endpoint errors

STATUSCODEDESCRIPTION
400VALIDATION_ERRORA declared header or body field is missing or out of range. Details are in X-Validation-Errors.
403FORBIDDENThe x-collection-api-key header is missing or does not belong to any collection.
404NOT_FOUNDNo endpoint matches the path and method.
429TOO_MANY_REQUESTSimulated. Only appears if this entry is in the pool and the roll triggers.
500INTERNAL_SERVICE_ERRORUnexpected server failure, or a simulated pool entry.
502BAD_GATEWAYSimulated pool entry.
504GATEWAY_TIMEOUTSimulated pool entry.
Simulated statuses are configurableThe 429, 502, 504 entries are defaults. You can replace them with any status between 200 and 599, so the table above reflects a fresh endpoint, not a hard rule.

The response body on 400 and simulated failures is your stored template rendered with {{message}}, {{status_code}}, and {{success}}. Do not rely on a fixed error JSON shape unless your template defines one.

Handling failures in clients

  • Treat 400 as a contract problem in your own request, not as a transient failure.
  • Treat 403 and 404 as configuration problems: check the key, path, and method.
  • Retry only on 429 and 5xx, and use exponential backoff.
  • Do not assume 200 always means success. Error simulation is designed to make status checks mandatory.