Get started
Errors
Predictable error classes and HTTP codes so you can build bulletproof retry logic.
#Error shape
Every 4xx / 5xx response follows the same JSON envelope:
JSON
#Status codes
| Status | Code | When | SDK class |
|---|---|---|---|
| 400 | validation_error | Missing or invalid body params. | ZaptickValidationError |
| 401 | invalid_api_key | API key missing, malformed, or revoked. | ZaptickAuthError |
| 403 | permission_denied | Key lacks access to that resource. | ZaptickForbiddenError |
| 404 | not_found | Resource does not exist or was deleted. | ZaptickNotFoundError |
| 429 | rate_limited | Too many requests — honor `Retry-After`. | ZaptickRateLimitError |
| 500 | internal_error | Something broke on our side — retry. | ZaptickError |
| 502 | upstream_error | Meta / upstream failure. Safe to retry. | ZaptickError |
#Retry strategy
The SDK retries idempotent requests (GET, PUT, DELETE) on 429, 5xx and network errors automatically, with exponential backoff honoring Retry-After. For writes you get full control:
TypeScript