-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathexceptions.py
More file actions
50 lines (39 loc) · 1.35 KB
/
exceptions.py
File metadata and controls
50 lines (39 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
"""
Custom exception classes for the MCP application.
"""
class BaseMCPError(Exception):
"""Base class for all MCP-related errors."""
pass
class ConfigurationError(BaseMCPError):
"""Raised when there is a configuration-related error."""
pass
class ConnectionError(BaseMCPError):
"""Raised when there is a connection-related error."""
pass
class ToolError(BaseMCPError):
"""Raised when there is an error related to tool operations."""
pass
class DatabaseConnectionError(BaseMCPError):
"""Raised when there is a database connection-related error."""
pass
class AuthenticationError(BaseMCPError):
"""Raised when there is an authentication-related error."""
pass
class AuthorizationError(BaseMCPError):
"""Raised when there is an authorization-related error."""
pass
class ValidationError(BaseMCPError):
"""Raised when there is a validation-related error."""
pass
class APIError(BaseMCPError):
"""Raised when there is an error related to API operations."""
pass
class FileNotFoundError(BaseMCPError):
"""Raised when a required file is not found."""
pass
class TimeoutError(BaseMCPError):
"""Raised when an operation times out."""
pass
class ServiceUnavailableError(BaseMCPError):
"""Raised when a service is unavailable."""
pass