deepsource-mcp-server
Version:
Model Context Protocol server for DeepSource
47 lines (46 loc) • 1.69 kB
TypeScript
/**
* @fileoverview Factory functions for creating common MCP errors
*/
import { MCPError } from './mcp-errors.js';
/**
* Creates an authentication error
*/
export declare function createAuthenticationError(message?: string, details?: Record<string, unknown>): MCPError;
/**
* Creates a resource not found error
*/
export declare function createResourceNotFoundError(resource: string, details?: Record<string, unknown>): MCPError;
/**
* Creates a validation error
*/
export declare function createValidationError(message: string, details?: Record<string, unknown>): MCPError;
/**
* Creates a server error
*/
export declare function createServerError(message?: string, cause?: Error, details?: Record<string, unknown>): MCPError;
/**
* Creates a timeout error
*/
export declare function createTimeoutError(operation: string, timeoutMs: number): MCPError;
/**
* Creates a rate limiting error
*/
export declare function createRateLimitedError(resetTime?: Date): MCPError;
/**
* Creates a configuration error
*/
export declare function createConfigurationError(message: string, details?: Record<string, unknown>): MCPError;
/**
* Creates a dependency error
*/
export declare function createDependencyError(service: string, cause?: Error): MCPError;
export declare const MCPErrorFactory: {
authentication: typeof createAuthenticationError;
resourceNotFound: typeof createResourceNotFoundError;
validation: typeof createValidationError;
server: typeof createServerError;
timeout: typeof createTimeoutError;
rateLimited: typeof createRateLimitedError;
configuration: typeof createConfigurationError;
dependency: typeof createDependencyError;
};