#[non_exhaustive]pub enum HttpConnectorError {
Request(String),
Status {
status: u16,
},
Auth(String),
InvalidHeader(String),
Backend(String),
}Expand description
Errors an HttpConnector implementation may surface.
The enum is #[non_exhaustive] so later plans can add failure modes
additively without a semver break (mirrors crate::sql::ConnectorError).
§Security
The inner String of every variant reaches MCP clients via Display.
Implementors MUST NOT include the request URL, an Authorization header
value, a bearer token, or an app_key in any inner String — those are
credentials or capability-bearing locators. Construct error messages from
non-secret context only (status code, a static reason). This mirrors the
ConnectorError::Connection discipline in sql/mod.rs (T-90-01-01).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Request(String)
The outgoing request failed at the transport layer (connect / timeout /
body read). The reqwest error is deliberately NOT forwarded verbatim —
its Display can echo the URL — so this carries a redacted reason only.
Status
The backend returned a non-2xx HTTP status.
Auth(String)
Authentication could not be applied to the outgoing request (e.g. a required passthrough token was absent). The reason MUST NOT echo the token or header value.
InvalidHeader(String)
A header name or value could not be constructed from the configured / supplied value. The reason MUST NOT echo a credential header’s value.
Backend(String)
A backend / configuration problem not covered by the variants above (e.g. an unparseable base URL, an unknown HTTP method).
Trait Implementations§
Source§impl Debug for HttpConnectorError
impl Debug for HttpConnectorError
Source§impl Display for HttpConnectorError
impl Display for HttpConnectorError
Source§impl Error for HttpConnectorError
impl Error for HttpConnectorError
1.30.0 · 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()
Auto Trait Implementations§
impl Freeze for HttpConnectorError
impl RefUnwindSafe for HttpConnectorError
impl Send for HttpConnectorError
impl Sync for HttpConnectorError
impl Unpin for HttpConnectorError
impl UnsafeUnpin for HttpConnectorError
impl UnwindSafe for HttpConnectorError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more