elasticsearch-mcp
Version:
Secure MCP server for Elasticsearch integration with comprehensive tools and Elastic Cloud support
43 lines • 1.7 kB
TypeScript
import { Logger } from '../logger.js';
export declare class ElasticMCPError extends Error {
readonly code: string;
readonly statusCode: number;
readonly context: Record<string, unknown> | undefined;
constructor(message: string, code: string, statusCode?: number, context?: Record<string, unknown>);
}
export declare class ValidationError extends ElasticMCPError {
constructor(message: string, context?: Record<string, unknown>);
}
export declare class ConnectionError extends ElasticMCPError {
constructor(message: string, context?: Record<string, unknown>);
}
export declare class AuthenticationError extends ElasticMCPError {
constructor(message: string, context?: Record<string, unknown>);
}
export declare class NotFoundError extends ElasticMCPError {
constructor(message: string, context?: Record<string, unknown>);
}
export declare class RateLimitError extends ElasticMCPError {
constructor(message: string, context?: Record<string, unknown>);
}
export declare class ElasticsearchError extends ElasticMCPError {
constructor(message: string, originalError?: Error, context?: Record<string, unknown>);
}
export interface ErrorResponse {
error: {
code: string;
message: string;
statusCode: number;
context: Record<string, unknown> | undefined;
timestamp: string;
requestId: string | undefined;
};
}
export declare class ErrorHandler {
private logger;
constructor(logger: Logger);
handleError(error: unknown, requestId?: string): ErrorResponse;
isRetryableError(error: unknown): boolean;
sanitizeError(error: ErrorResponse): ErrorResponse;
}
//# sourceMappingURL=handlers.d.ts.map