Skip to main content
Glama
haasonsaas

Deep Code Reasoning MCP Server

by haasonsaas
index.ts1.86 kB
/** * Custom error classes for precise error handling */ export class SessionError extends Error { readonly code: string; readonly sessionId?: string; constructor(message: string, code: string = 'SESSION_ERROR', sessionId?: string) { super(message); this.name = 'SessionError'; this.code = code; this.sessionId = sessionId; } } export class ApiError extends Error { readonly code: string; readonly statusCode?: number; readonly service: string; constructor(message: string, code: string = 'API_ERROR', service: string = 'unknown', statusCode?: number) { super(message); this.name = 'ApiError'; this.code = code; this.service = service; this.statusCode = statusCode; } } export class FileSystemError extends Error { readonly code: string; readonly path?: string; readonly operation?: string; constructor(message: string, code: string = 'FS_ERROR', path?: string, operation?: string) { super(message); this.name = 'FileSystemError'; this.code = code; this.path = path; this.operation = operation; } } export class RateLimitError extends ApiError { readonly retryAfter?: number; constructor(message: string, service: string = 'gemini', retryAfter?: number) { super(message, 'RATE_LIMIT_ERROR', service, 429); this.name = 'RateLimitError'; this.retryAfter = retryAfter; } } export class ConversationLockedError extends SessionError { constructor(sessionId: string) { super(`Session ${sessionId} is currently processing another request`, 'SESSION_LOCKED', sessionId); this.name = 'ConversationLockedError'; } } export class SessionNotFoundError extends SessionError { constructor(sessionId: string) { super(`Session ${sessionId} not found or expired`, 'SESSION_NOT_FOUND', sessionId); this.name = 'SessionNotFoundError'; } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/haasonsaas/deep-code-reasoning-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server