TheoApiError
All API errors are thrown asTheoApiError instances with structured details.
Error Properties
| Property | Type | Description |
|---|---|---|
status | number | HTTP status code (0 for network errors) |
message | string | Human-readable error message |
body | string | Raw response body |
url | string | Request URL |
details | object | null | Parsed { message, type, code, request_id } |
Automatic Retries
The SDK retries automatically on:- 429 — Rate limited (respects
Retry-After) - 5xx — Server errors (exponential backoff: 1s, 2s, 4s, max 8s)
