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

CodeClassificationDiagnosticResolution
400Bad RequestMalformed payload, missing required parameters, or invalid model routing identifier.Validate JSON schema, check model registry, and ensure token presence.
401UnauthorizedCryptographic signature invalid or TTL expired.Execute silent rotation via refresh token or re-authenticate.
402Payment RequiredWallet liquidity exhausted or billing heuristic failure.Prompt user to inject capital via the rNet dashboard.
404Not FoundInference engine identifier does not exist in the active routing table.Verify the model string against the Supported Models Registry.
422Unprocessable EntityJSON is valid, but the upstream provider rejected the specific schema structure.Ensure the payload strictly matches the upstream provider documentation.
429Too Many RequestsRate limit threshold exceeded for the current temporal window.Implement exponential backoff and respect X-RateLimit-Reset headers.
500Internal Server ErrorCatastrophic failure within the proxy routing or billing computation layers.Engage telemetry and retry. Contact enterprise support if persistent.
502Bad GatewayUpstream 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}