Gateway response codes
Understand the public error shape returned by the gateway.
Understand the public error shape returned by the gateway.
Gateway errors use a compact JSON shape:
{
"error": "Human-readable message",
"code": "machine_readable_code"
}
The exact set of codes can evolve, but the categories are stable.
| Category | Meaning | Subscriber action |
|---|---|---|
| Authentication | Missing or invalid key. | Send the correct API key. |
| Authorization | Subscription or plan does not allow access. | Check plan and subscription state. |
| Limits | Usage, concurrency, or quota limit reached. | Wait, upgrade, or enable overage. |
| Credits | Not enough prepaid balance. | Add credits or change plan. |
| Routing | Product or upstream route was not found. | Check hostname and path. |
| Runtime | Gateway could not safely complete enforcement. | Retry or contact support. |
code.Client integrations should treat gateway denials as expected API responses, not
network failures. Log the code and expose the error message to operators.
Support should ask for the response code, request time, hostname, and key
label. Never request the full API key.