/** * Structured error types for MCP server * * Provides type-safe error handling with machine-readable error codes * and structured error details for better debugging and client handling. */ export declare class MCPError extends Error { code: string; details?: Record | undefined; constructor(message: string, code: string, details?: Record | undefined); } export declare class ValidationError extends MCPError { constructor(message: string, details?: Record); } export declare class OperationNotFoundError extends MCPError { constructor(operationId: string); } export declare class ResourceNotFoundError extends MCPError { constructor(resource: string, resourceType?: string); } export declare class ParameterError extends MCPError { constructor(paramName: string, reason: string); } export declare class AuthenticationError extends MCPError { constructor(message?: string, details?: Record); } export declare class AuthorizationError extends MCPError { constructor(message?: string); } export declare class RateLimitError extends MCPError { constructor(message: string, retryAfter?: number); } export declare class OAuthClientStoreCapacityError extends MCPError { constructor(message?: string, details?: Record); } export declare class NetworkError extends MCPError { constructor(message: string, statusCode?: number, details?: Record); } export declare class ConfigurationError extends MCPError { constructor(message: string, details?: Record); } export declare class SessionError extends MCPError { constructor(message: string, sessionId?: string); } export declare class UnknownCliFlagError extends MCPError { constructor(flags: string[]); } /** * Helper function to check if an error is an MCPError */ export declare function isMCPError(error: unknown): error is MCPError; /** * Generate a unique correlation ID for error tracking * * Why: Allows matching client-reported errors with server logs */ export declare function generateCorrelationId(): string; /** * Helper function to get error details for logging */ export declare function getErrorDetails(error: unknown): Record; //# sourceMappingURL=errors.d.ts.map