/** * Error Handling Utilities * * Custom error types and formatting for consistent error handling */ /** * GraphQL error detail structure */ type GraphQLErrorDetail = { message: string; locations?: Array<{ line: number; column: number; }>; path?: Array; extensions?: Record; }; /** * GraphQL-specific error with response details */ export declare class GraphQLError extends Error { errors: GraphQLErrorDetail[]; constructor(message: string, errors: GraphQLErrorDetail[]); } /** * Input validation error */ export declare class ValidationError extends Error { constructor(message: string); } /** * Cache operation error */ export declare class CacheError extends Error { constructor(message: string); } /** * Network/connection error */ export declare class NetworkError extends Error { constructor(message: string); } /** * Format error for user-facing display */ export declare function formatError(error: unknown): string; /** * MCP error response type */ type MCPErrorResponse = { content: Array<{ type: 'text'; text: string; }>; isError: true; }; /** * Standard error response for MCP tools */ export declare function errorResponse(error: unknown): MCPErrorResponse; /** * Log error to stderr (Claude Code captures this) */ export declare function logError(error: unknown, context?: string): void; export {}; //# sourceMappingURL=errors.d.ts.map