pub enum TransportError {
Show 15 variants
ConnectionFailed {
transport_type: String,
reason: String,
},
ConnectionLost {
transport_type: String,
reason: String,
},
SendFailed {
transport_type: String,
reason: String,
},
ReceiveFailed {
transport_type: String,
reason: String,
},
InvalidConfig {
transport_type: String,
reason: String,
},
ProcessError {
reason: String,
},
HttpError {
status_code: u16,
reason: String,
},
SseError {
reason: String,
},
StreamingError {
reason: String,
},
NotConnected {
transport_type: String,
reason: String,
},
NetworkError {
transport_type: String,
reason: String,
},
SerializationError {
transport_type: String,
reason: String,
},
TimeoutError {
transport_type: String,
reason: String,
},
DisconnectedError {
transport_type: String,
reason: String,
},
ConnectionError {
transport_type: String,
reason: String,
},
}Expand description
Transport-specific errors for different MCP transport mechanisms.
Each transport type (stdio, HTTP+SSE, HTTP streaming) can have specific failure modes that need to be handled appropriately.
Variants§
ConnectionFailed
Failed to establish connection to the MCP server
ConnectionLost
Connection was lost during operation
SendFailed
Failed to send message to server
ReceiveFailed
Failed to receive message from server
InvalidConfig
Transport-specific configuration is invalid
ProcessError
Process-related errors for stdio transport
HttpError
HTTP-specific errors for HTTP transports
SseError
Server-Sent Events specific errors
StreamingError
Streaming protocol errors
NotConnected
Transport is not connected
NetworkError
Generic network error
SerializationError
Message serialization/deserialization error
TimeoutError
Operation timed out
DisconnectedError
Transport unexpectedly disconnected
ConnectionError
Connection error (alias for ConnectionFailed for compatibility)
Implementations§
Source§impl TransportError
impl TransportError
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if this transport error is retryable.
Trait Implementations§
Source§impl Clone for TransportError
impl Clone for TransportError
Source§fn clone(&self) -> TransportError
fn clone(&self) -> TransportError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more