Error Handlers
Comprehensive reference for standardized error schemas emitted by the rNet proxy network.
Standard Error Schema
The rNet proxy may emit HTTP 200 OK while embedding the actual failure state within the JSON response to bypass aggressive client-side network interceptors.
json
{
"message": "Human-readable diagnostic message",
"error": "Short error code description",
"errorCode": 402
}Your application layer must interrogate the errorCode field explicitly.
HTTP Status Matrix
| Code | Classification | Diagnostic | Resolution |
|---|---|---|---|
| 400 | Bad Request | Malformed payload, missing required parameters, or invalid model routing identifier. | Validate JSON schema, check model registry, and ensure token presence. |
| 401 | Unauthorized | Cryptographic signature invalid or TTL expired. | Execute silent rotation via refresh token or re-authenticate. |
| 402 | Payment Required | Wallet liquidity exhausted or billing heuristic failure. | Prompt user to inject capital via the rNet dashboard. |
| 404 | Not Found | Inference engine identifier does not exist in the active routing table. | Verify the model string against the Supported Models Registry. |
| 422 | Unprocessable Entity | JSON is valid, but the upstream provider rejected the specific schema structure. | Ensure the payload strictly matches the upstream provider documentation. |
| 429 | Too Many Requests | Rate limit threshold exceeded for the current temporal window. | Implement exponential backoff and respect X-RateLimit-Reset headers. |
| 500 | Internal Server Error | Catastrophic failure within the proxy routing or billing computation layers. | Engage telemetry and retry. Contact enterprise support if persistent. |
| 502 | Bad Gateway | Upstream provider (OpenAI/Google) is unresponsive or experiencing an outage. | Monitor provider status pages and implement fallback circuit breakers. |
Streaming Interruptions
For /ai/stream endpoints, if a failure occurs after the HTTP 200 OK header has been flushed, the error is transmitted as a Server-Sent Event (SSE):
text
event: billing_error
data: {"message":"Insufficient liquidity detected mid-stream","errorCode":402}