UNPKG

aluvia-ts-sdk

Version:

Official Aluvia proxy management SDK for Node.js and modern JavaScript environments

56 lines 1.82 kB
/** * Custom error types for the Aluvia SDK */ /** * Base class for all Aluvia SDK errors */ export declare abstract class AluviaError extends Error { readonly details?: Record<string, any> | undefined; abstract readonly code: string; constructor(message: string, details?: Record<string, any> | undefined); } /** * Thrown when API authentication fails */ export declare class AuthenticationError extends AluviaError { readonly code = "AUTHENTICATION_ERROR"; constructor(message?: string, details?: Record<string, any>); } /** * Thrown when API requests fail due to network issues */ export declare class NetworkError extends AluviaError { readonly code = "NETWORK_ERROR"; constructor(message?: string, details?: Record<string, any>); } /** * Thrown when API returns an error response */ export declare class ApiError extends AluviaError { readonly statusCode?: number | undefined; readonly code = "API_ERROR"; constructor(message?: string, statusCode?: number | undefined, details?: Record<string, any>); } /** * Thrown when input validation fails */ export declare class ValidationError extends AluviaError { readonly code = "VALIDATION_ERROR"; constructor(message?: string, details?: Record<string, any>); } /** * Thrown when a requested resource is not found */ export declare class NotFoundError extends AluviaError { readonly code = "NOT_FOUND_ERROR"; constructor(message?: string, details?: Record<string, any>); } /** * Thrown when rate limits are exceeded */ export declare class RateLimitError extends AluviaError { readonly retryAfter?: number | undefined; readonly code = "RATE_LIMIT_ERROR"; constructor(message?: string, retryAfter?: number | undefined, details?: Record<string, any>); } //# sourceMappingURL=errors.d.ts.map