UNPKG

deepsource-mcp-server

Version:
29 lines (28 loc) 925 B
/** * @fileoverview Converts various error types to MCP-compliant errors */ import { MCPError } from './mcp-errors.js'; import { ClassifiedError } from '../errors/types.js'; /** * Converts a standard Error to MCPError */ declare function fromStandardError(error: Error, context?: string): MCPError; /** * Converts a DeepSource API error to MCPError */ declare function fromDeepSourceError(error: ClassifiedError): MCPError; /** * Converts any error to an MCPError */ export declare function toMCPError(error: unknown, context?: string): MCPError; /** * Converts DeepSource API errors to MCP errors */ export declare function fromApiError(error: unknown, context?: string): MCPError; export declare const MCPErrorConverter: { toMCPError: typeof toMCPError; fromApiError: typeof fromApiError; fromStandardError: typeof fromStandardError; fromDeepSourceError: typeof fromDeepSourceError; }; export {};