Overview
The Cuey TypeScript client provides typed error classes for different error scenarios. All errors extend fromCueyError and include status codes and error details.
Error Classes
CueyError
Base error class for all Cuey API errors.Base error class extending JavaScript’s
Error.UnauthorizedError (401)
Thrown when the API key is invalid or missing.Extends
CueyError. Thrown when authentication fails.NotFoundError (404)
Thrown when a requested resource doesn’t exist.Extends
CueyError. Thrown when a resource is not found.BadRequestError (400)
Thrown when the request is invalid (e.g., trying to update a non-pending event).Extends
CueyError. Thrown when the request is invalid.ValidationError (400)
Thrown when request validation fails. Includes detailed validation errors.Extends
CueyError. Thrown when request validation fails.InternalServerError (500+)
Thrown when a server error occurs (e.g., requesting an out-of-range page).Extends
CueyError. Thrown when a server error occurs.Error Codes
Union type of all possible error codes.