DeytaError
Thrown when the API responds with a non-2xx status. Fields:
Machine-readable error code (see below).
HTTP status code from the response.
Human-readable error message from the API.
Error codes
| Code | HTTP status | Typical cause |
|---|---|---|
BAD_REQUEST | 400 | Invalid input or missing fields |
UNAUTHORIZED | 401 | Missing or invalid API key |
FORBIDDEN | 403 | API key lacks required scope |
NOT_FOUND | 404 | Resource does not exist |
CONFLICT | 409 | Conflicting state (e.g., duplicate external ref) |
INTERNAL_ERROR | 500 | Unexpected server-side failure |
BAD_GATEWAY | 502 | Upstream gateway error |
SERVICE_UNAVAILABLE | 503 | Service temporarily unavailable |
GATEWAY_TIMEOUT | 504 | Upstream request timed out |
DeytaConnectionError
Thrown when the request never received a response — network failures, the
SDK’s timeout firing, or caller-side AbortSignal cancellation. Fields:
Description of the failure.
The original error from
fetch or the AbortSignal, when available.Distinguishing timeouts from real network errors
If you’ve configured a per-calltimeout or passed your own AbortSignal,
both surface as DeytaConnectionError. Inspect the cause to differentiate: