Module error

Source
Expand description

Error types for MCP (Model Context Protocol) operations.

This module provides comprehensive error handling for all MCP operations, including transport-specific errors, protocol errors, and validation errors.

§Design Philosophy

The error system is designed to be:

  • Informative: Provide clear, actionable error messages
  • Structured: Use strongly-typed error variants for programmatic handling
  • Transport-aware: Include transport-specific error context
  • Debuggable: Include sufficient context for debugging
  • User-friendly: Format appropriately for end-user display

Enums§

AuthError
Authentication and authorization errors.
ConfigError
Configuration-related errors.
McpError
The main error type for all MCP operations.
ProtocolError
Protocol-level errors related to MCP message handling.
TransportError
Transport-specific errors for different MCP transport mechanisms.
ValidationError
Validation errors for MCP capabilities and schemas.

Type Aliases§

McpResult
Convenience type alias for Results using McpError.