/** * Error handling utilities for the MCP Finance server */ export declare class FinanceError extends Error { code: string; statusCode: number; details?: any | undefined; constructor(message: string, code: string, statusCode: number, details?: any | undefined); } export declare class ErrorHandler { /** * Handle and transform errors into FinanceError instances */ static handle(error: unknown): FinanceError; /** * Handle Zod validation errors */ private static handleZodError; /** * Handle Yahoo Finance API errors */ private static handleYahooError; /** * Handle SEC EDGAR API errors */ private static handleSECError; /** * Handle generic Error instances */ private static handleGenericError; /** * Check if an error is from Yahoo Finance */ private static isYahooFinanceError; /** * Check if an error is from SEC EDGAR */ private static isSECError; /** * Format error for MCP response */ static toMCPError(error: FinanceError): { error: string; code: string; details?: any; }; } /** * Retry utility with exponential backoff */ export declare function withRetry(fn: () => Promise, options?: { maxRetries?: number; baseDelay?: number; maxDelay?: number; shouldRetry?: (error: any) => boolean; }): Promise; //# sourceMappingURL=error-handler.d.ts.map