Skip to main content

Error Codes

All errors return HTTP 200 with structured envelope. Check success field and metadata.errors array.

Request Errors

INVALID_REQUEST

Cause: Missing or invalid parameters Example:
Fix: Check request body matches API spec

PAYLOAD_TOO_LARGE

Cause: Input exceeds size limit Limits:
  • Batch repair: 5MB
  • Streaming chunk: 5MB per chunk
Example:
Fix: Split large inputs into smaller chunks using streaming

Repair Errors

UNRECOVERABLE_SYNTAX_ERROR

Cause: Input contains no recoverable JSON structure after syntax repair Example:
Fix: Verify LLM is configured for JSON output

SCHEMA_VALIDATION_FAILED

Cause: Repaired JSON doesn’t match provided schema Example:
Fix: Review schema or adjust LLM prompt

Session Errors

SESSION_NOT_FOUND

Cause: Streaming session expired or doesn’t exist Session TTL: 60 seconds Example:
Fix: Create new session or reduce time between chunks

BUFFER_SIZE_EXCEEDED

Cause: Session buffer exceeded limit (possible hallucination loop) Circuit Breaker: 5MB buffer limit Example:
Fix: Check LLM for hallucination loops, add max tokens limit

Service Errors

SERVICE_UNAVAILABLE

Cause: Server at maximum capacity Example:
Fix: Retry with exponential backoff

INTERNAL_ERROR

Cause: Unexpected server error Example:
Fix: Contact support with request ID from X-Request-ID header

Authentication Errors

INVALID_API_KEY

Cause: API key is invalid or revoked Example:
Fix: Generate new API key in console

RATE_LIMIT_EXCEEDED

Cause: Exceeded tier rate limit Example:
Fix: Upgrade tier or wait for limit reset

Error Response Structure

All errors follow this structure:

Handling Errors

Check Success Field

Retry Logic


Next Steps

Batch Endpoint

API reference for batch repair

Streaming Endpoints

API reference for streaming repair

Error Handling Guide

Best practices for error handling

Rate Limits

Understand tier limits