deepsource-mcp-server
Version:
Model Context Protocol server for DeepSource
29 lines (28 loc) • 925 B
TypeScript
/**
* @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 {};