VerialError. API errors extend APIError with a numeric status, a string code, and an optional requestId captured from the response.
Hierarchy
Fields
EveryAPIError exposes:
| Field | Type | Description |
|---|---|---|
status | number | HTTP status code |
code | string | Machine-readable error code from the API (e.g. RESOURCE_NOT_FOUND) |
message | string | Human-readable message. Includes (request_id: ...) when provided. |
requestId | string | undefined | Request ID — include this when filing support tickets. |
headers | Headers | undefined | Response headers |
errors | object | undefined | Field-level validation details for ValidationError |
RateLimitError additionally exposes:
| Field | Type | Description |
|---|---|---|
retryAfter | number | undefined | Seconds until the next retry, parsed from Retry-After header |
Catching
Retry Behavior
The SDK automatically retries these statuses with exponential backoff + jitter:408Request Timeout429Too Many Requests (honorsRetry-After)500/502/503/504
APIConnectionError). APITimeoutError is not retried — it surfaces immediately so callers can decide.
Retries default to 2 (3 total attempts). Override with maxRetries:
min(0.5 * 2^attempt, 8) seconds with ±20% jitter. Retry-After on 429 overrides the backoff.
Timeouts
Requests time out after60000 ms by default. Override per-client:
APITimeoutError immediately without retrying.