TypeScript SDK — Errors
Error classes and retry behavior.
| Class | Status | When |
|---|---|---|
| KorClawError | varies | Base error with status, code, requestId |
| AuthenticationError | 401 | Invalid or missing API key |
| ValidationError | 400 | Invalid request parameters |
| RateLimitError | 429 | Rate limited; includes retryAfter |
| PolicyBlockedError | 403 | Policy blocked the action; includes evaluation |
| PolicyApprovalRequiredError | 403 | Approval required; includes evaluation |
The SDK retries on network errors, 429, and 5xx with exponential backoff and jitter. Honors Retry-After on 429.