nat.tool.mcp.exceptions#
Exceptions#
Base exception for MCP-related errors. |
|
Exception for MCP connection failures. |
|
Exception for MCP timeout errors. |
|
Exception for MCP SSL/TLS errors. |
|
Exception for MCP request errors. |
|
Exception for when a specific MCP tool is not found. |
|
Exception for MCP authentication failures. |
|
Exception for MCP protocol-related errors. |
Classes#
Categories of MCP errors for structured handling. |
Module Contents#
- class MCPErrorCategory#
-
Categories of MCP errors for structured handling.
Initialize self. See help(type(self)) for accurate signature.
- CONNECTION = 'connection'#
- TIMEOUT = 'timeout'#
- SSL = 'ssl'#
- AUTHENTICATION = 'authentication'#
- TOOL_NOT_FOUND = 'tool_not_found'#
- PROTOCOL = 'protocol'#
- UNKNOWN = 'unknown'#
- exception MCPError(
- message: str,
- url: str,
- category: MCPErrorCategory = MCPErrorCategory.UNKNOWN,
- suggestions: list[str] | None = None,
- original_exception: Exception | None = None,
Bases:
Exception
Base exception for MCP-related errors.
Initialize self. See help(type(self)) for accurate signature.
- url#
- category#
- suggestions = []#
- original_exception = None#
- exception MCPConnectionError( )#
Bases:
MCPError
Exception for MCP connection failures.
Initialize self. See help(type(self)) for accurate signature.
- exception MCPTimeoutError(url: str, original_exception: Exception | None = None)#
Bases:
MCPError
Exception for MCP timeout errors.
Initialize self. See help(type(self)) for accurate signature.
- exception MCPSSLError(url: str, original_exception: Exception | None = None)#
Bases:
MCPError
Exception for MCP SSL/TLS errors.
Initialize self. See help(type(self)) for accurate signature.
- exception MCPRequestError(url: str, original_exception: Exception | None = None)#
Bases:
MCPError
Exception for MCP request errors.
Initialize self. See help(type(self)) for accurate signature.
- exception MCPToolNotFoundError( )#
Bases:
MCPError
Exception for when a specific MCP tool is not found.
Initialize self. See help(type(self)) for accurate signature.