UNPKG

@swimmable/sdk

Version:

Official JavaScript/TypeScript SDK for the Swimmable API - Real-time swimming conditions and water quality data

46 lines 1.47 kB
/** * Exception classes for the Swimmable JavaScript SDK */ /** * Base exception class for all Swimmable SDK errors */ export declare class SwimmableError extends Error { status?: number; code?: string; endpoint?: string; constructor(message: string, status?: number, code?: string, endpoint?: string); } /** * Exception raised for API-related errors (4xx, 5xx responses) */ export declare class SwimmableAPIError extends SwimmableError { responseData?: any; constructor(message: string, status: number, code?: string, endpoint?: string, responseData?: any); } /** * Exception raised when a request times out */ export declare class SwimmableTimeoutError extends SwimmableError { timeout?: number; constructor(message?: string, timeout?: number); } /** * Exception raised for client-side validation errors */ export declare class SwimmableValidationError extends SwimmableError { constructor(message: string); } /** * Exception raised for authentication-related errors (401, 403) */ export declare class SwimmableAuthenticationError extends SwimmableAPIError { constructor(message: string, status: number, code?: string, endpoint?: string); } /** * Exception raised when rate limits are exceeded (429) */ export declare class SwimmableRateLimitError extends SwimmableAPIError { retryAfter?: number; constructor(message: string, retryAfter?: number, endpoint?: string); } //# sourceMappingURL=exceptions.d.ts.map