/** * Error types and classes for Scrapeless Browser Skills */ export declare enum ScrapelessErrorType { AUTHENTICATION_ERROR = "AUTHENTICATION_ERROR", SESSION_NOT_FOUND = "SESSION_NOT_FOUND", SESSION_TERMINATED = "SESSION_TERMINATED", NETWORK_ERROR = "NETWORK_ERROR", TIMEOUT_ERROR = "TIMEOUT_ERROR", INVALID_CONFIGURATION = "INVALID_CONFIGURATION", CDP_ERROR = "CDP_ERROR", ELEMENT_NOT_FOUND = "ELEMENT_NOT_FOUND", INVALID_SELECTOR = "INVALID_SELECTOR", API_ERROR = "API_ERROR", UNKNOWN_ERROR = "UNKNOWN_ERROR" } export declare class ScrapelessError extends Error { readonly type: ScrapelessErrorType; readonly code?: string; readonly statusCode?: number; readonly retryable: boolean; constructor(type: ScrapelessErrorType, message: string, options?: { code?: string; statusCode?: number; retryable?: boolean; cause?: Error; }); static fromResponse(response: Response, body?: any): ScrapelessError; static fromNetworkError(error: Error): ScrapelessError; static fromCDPError(error: any): ScrapelessError; static elementNotFound(selector: string): ScrapelessError; static invalidSelector(selector: string): ScrapelessError; static invalidConfiguration(message: string): ScrapelessError; /** * Get a user-friendly error message with helpful suggestions */ getUserMessage(): string; } /** * Retry configuration */ export interface RetryConfig { maxAttempts: number; baseDelay: number; maxDelay: number; backoffFactor: number; } export declare const DEFAULT_RETRY_CONFIG: RetryConfig; /** * Retry a function with exponential backoff */ export declare function withRetry(fn: () => Promise, config?: Partial): Promise; //# sourceMappingURL=errors.d.ts.map