export declare class McpError extends Error { readonly code: string; readonly statusCode: number | undefined; readonly details: any; constructor(message: string, code?: string, statusCode?: number, details?: any); } export declare class ValidationError extends McpError { constructor(message: string, details?: any); } export declare class ApiConnectionError extends McpError { constructor(message: string, details?: any); } export declare class AuthenticationError extends McpError { constructor(message: string, details?: any); } export declare class NotFoundError extends McpError { constructor(message: string, details?: any); } /** * Global error handler for unhandled errors */ export declare function setupGlobalErrorHandlers(): void; /** * Validate required arguments for MCP tools */ export declare function validateArgs(args: any, requiredFields: string[]): void; /** * Sanitize error for client response */ export declare function sanitizeError(error: Error): any; /** * Wrap async functions with error handling */ export declare function withErrorHandling(fn: (...args: T) => Promise, context: string): (...args: T) => Promise; //# sourceMappingURL=error-handler.d.ts.map