Skip to content

Errors

Exceptions mirror the JavaScript hierarchy (TypeSafeError → TypeSafeException, and so on).

Type When
TypeSafeException Validation / configuration
ApiException Non-2xx after retries
BadRequestException 400
AuthenticationException 401
PermissionDeniedException 403
NotFoundException 404
UnprocessableEntityException 422
RateLimitException 429
InternalServerException 5xx
ApiConnectionException Transport failure
ApiTimeoutException Attempt timed out
ApiUserAbortException Cancelled CancellationToken

Catch more specific types first when you need distinct handling for auth vs rate limits vs timeouts.

MIT · Copyright (c) Dario Kondratiuk. · not affiliated with TypeSafe beyond being a client of the public API