UNPKG

minimax-mcp-tools

Version:

Async MCP server with Minimax API integration for image generation and text-to-speech

56 lines 1.89 kB
export declare class MinimaxError extends Error { readonly code: string; readonly details: any; readonly timestamp: string; constructor(message: string, code?: string, details?: any); toJSON(): { name: string; message: string; code: string; details: any; timestamp: string; }; } export declare class MinimaxConfigError extends MinimaxError { constructor(message: string, details?: any); } export declare class MinimaxAPIError extends MinimaxError { readonly statusCode: number | null; readonly response: any; constructor(message: string, statusCode?: number | null, response?: any); } export declare class MinimaxValidationError extends MinimaxError { readonly field: string | null; readonly value: any; constructor(message: string, field?: string | null, value?: any); } export declare class MinimaxNetworkError extends MinimaxError { readonly originalError: Error | null; constructor(message: string, originalError?: Error | null); } export declare class MinimaxTimeoutError extends MinimaxError { readonly timeout: number | null; constructor(message: string, timeout?: number | null); } export declare class MinimaxRateLimitError extends MinimaxError { readonly retryAfter: number | null; constructor(message: string, retryAfter?: number | null); } interface APIResponse { base_resp?: { status_code: number; status_msg?: string; retry_after?: number; }; } interface NodeError extends Error { code?: string; timeout?: number; } export declare class ErrorHandler { static handleAPIError(error: NodeError, response?: APIResponse): MinimaxError; static formatErrorForUser(error: Error): string; static logError(error: Error, context?: Record<string, any>): void; } export {}; //# sourceMappingURL=error-handler.d.ts.map