UNPKG

mcp-server-logzio

Version:

Model Context Protocol server for Logz.io log management platform

63 lines 1.95 kB
/** * Base error class for MCP Logz.io server errors */ export declare abstract class LogzioError extends Error { readonly code: string; readonly context?: Record<string, unknown>; constructor(message: string, code: string, context?: Record<string, unknown>); toJSON(): Record<string, unknown>; } /** * Configuration-related errors */ export declare class ConfigurationError extends LogzioError { constructor(message: string, context?: Record<string, unknown>); } /** * API-related errors */ export declare class ApiError extends LogzioError { readonly statusCode?: number; readonly response?: unknown; constructor(message: string, statusCode?: number, response?: unknown, context?: Record<string, unknown>); static fromResponse(response: { status: number; data?: unknown; }, context?: Record<string, unknown>): ApiError; } /** * Authentication-related errors */ export declare class AuthenticationError extends LogzioError { constructor(message: string, context?: Record<string, unknown>); } /** * Rate limiting errors */ export declare class RateLimitError extends LogzioError { readonly retryAfter?: number; constructor(message: string, retryAfter?: number, context?: Record<string, unknown>); } /** * Validation-related errors */ export declare class ValidationError extends LogzioError { readonly field?: string; constructor(message: string, field?: string, context?: Record<string, unknown>); } /** * Tool execution errors */ export declare class ToolError extends LogzioError { readonly toolName: string; constructor(message: string, toolName: string, context?: Record<string, unknown>); } /** * Check if error is retryable */ export declare function isRetryableError(error: unknown): boolean; /** * Extract retry delay from error */ export declare function getRetryDelay(error: unknown): number | undefined; //# sourceMappingURL=errors.d.ts.map