Skip to main content
Glama
__init__.py1.26 kB
""" MCP 캘린더 시스템의 예외 처리 """ from typing import Optional class CalendarException(Exception): """캘린더 관련 기본 예외""" def __init__(self, message: str, cause: Optional[Exception] = None): super().__init__(message) self.cause = cause class EventNotFound(CalendarException): """이벤트를 찾을 수 없는 경우""" def __init__(self, event_id: int): super().__init__(f"Event not found: {event_id}") self.event_id = event_id class InvalidEventData(CalendarException): """잘못된 이벤트 데이터""" def __init__(self, field: str, value: str): super().__init__(f"Invalid {field}: {value}") self.field = field self.value = value class McpClientError(CalendarException): """MCP 클라이언트 오류""" def __init__(self, message: str, cause: Optional[Exception] = None): super().__init__(f"MCP client error: {message}") self.cause = cause class UnauthorizedAccess(CalendarException): """권한 없는 접근""" def __init__(self, user_id: int, event_id: int): super().__init__(f"User {user_id} cannot access event {event_id}") self.user_id = user_id self.event_id = event_id

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/highthon-16/MCP'

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