/** * Custom error classes for r3 * Provides structured error handling with context and recovery strategies */ export declare class R3callError extends Error { readonly code: string; readonly retryable: boolean; readonly timestamp: Date; readonly context?: Record; constructor(message: string, code: string, retryable?: boolean, context?: Record); toJSON(): { name: string; message: string; code: string; retryable: boolean; timestamp: Date; context: Record | undefined; stack: string | undefined; }; } export declare class RedisConnectionError extends R3callError { constructor(message: string, context?: Record); } export declare class RedisOperationError extends R3callError { constructor(operation: string, originalError: Error, context?: Record); } export declare class CacheError extends R3callError { constructor(operation: string, message: string, retryable?: boolean, context?: Record); } export declare class Mem0APIError extends R3callError { readonly statusCode?: number | undefined; constructor(statusCode?: number | undefined, message?: string, context?: Record); } export declare class DuplicateMemoryError extends R3callError { readonly existingId: string; readonly similarity: number; constructor(existingId: string, similarity: number, existingMemory?: string); } export declare class ValidationError extends R3callError { constructor(field: string, message: string, context?: Record); } export declare class TimeoutError extends R3callError { constructor(operation: string, timeoutMs: number, context?: Record); } export declare class JobQueueError extends R3callError { constructor(jobId: string, message: string, retryable?: boolean, context?: Record); } export declare class IntelligenceError extends R3callError { constructor(feature: string, message: string, fallbackAvailable?: boolean, context?: Record); } export declare class InitializationError extends R3callError { constructor(component: string, message: string, context?: Record); } /** * Error handler utility for consistent error logging and recovery */ export declare class ErrorHandler { private static readonly MAX_RETRIES; private static readonly RETRY_DELAYS; static withRetry(operation: () => Promise, operationName: string, maxRetries?: number): Promise; static handleError(error: any, context?: string): never; static logError(error: any, context?: string): void; } //# sourceMappingURL=errors.d.ts.map