pub enum DetectError {
Io {
error: Error,
},
Unusable {
status: StatusCode,
preview: String,
},
Neither {
status: StatusCode,
source: LegacySseError,
},
}Expand description
Why a server could not be classified.
Variants§
Io
The probe request never reached the peer.
Unusable
The probe was answered with a status the rule does not cover.
Its own variant rather than a bare HttpClientError, because which
status it was is the entire decision and a caller that gets it as a
string has to re-derive the branch the rule already made. A 5xx is the
case that matters: the peer answered, it speaks the new transport, and
something on it is broken.
Fields
status: StatusCodeThe status the peer answered with.
Neither
The peer answered 4xx and then would not open a stream either.
The two halves of the rule both ran and neither produced a transport, which means the URL is not an MCP server at all. Reporting “no transport” without saying which half failed would send a reader looking at the wrong transport.
Fields
status: StatusCodeThe status that triggered the fallback.
source: LegacySseErrorWhat the GET half said.
Trait Implementations§
Source§impl Debug for DetectError
impl Debug for DetectError
Source§impl Display for DetectError
impl Display for DetectError
Source§impl Error for DetectError
impl Error for DetectError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()