#[non_exhaustive]pub enum ConnectorError {
Io(String),
Schema(String),
DialectMismatch {
used: Dialect,
actual: Dialect,
},
Driver(String),
Query(String),
ParameterBind {
name: String,
reason: String,
},
Connection(String),
}Expand description
Errors a SqlConnector impl may surface from SqlConnector::schema_text
or SqlConnector::execute.
The enum is #[non_exhaustive], so Phase 84 (CONN-01) adds the execute-time
variants (Driver, Query, ParameterBind, Connection) additively
without a semver break, and later phases can add more failure modes the same
way.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(String)
Underlying transport / driver I/O error.
Schema(String)
Failed to enumerate or render the schema text.
DialectMismatch
A connector was asked to handle work for the wrong dialect (e.g. a query labelled Postgres routed to a MySQL connector).
Fields
Driver(String)
The underlying driver reported a failure (e.g. a tokio-postgres,
sqlx, aws-sdk-athena, or rusqlite error) that is not a query or
connection problem on its own.
Query(String)
The backend rejected the query (syntax error, unknown table/column, permission denied on the statement, etc.).
ParameterBind
A named parameter from the caller’s &[(String, Value)] slice could not
be bound to the translated statement (type mismatch, missing binding,
unsupported value shape, etc.).
Fields
Connection(String)
The connector could not establish or maintain a connection to the backend.
§Security
Implementors MUST redact credentials (passwords, AWS keys) before
constructing this variant — the inner String reaches MCP clients via
Display. NEVER pass a raw DATABASE_URL or AWS_* value here; strip
or mask the secret first (T-84-01-01).
Trait Implementations§
Source§impl Debug for ConnectorError
impl Debug for ConnectorError
Source§impl Display for ConnectorError
impl Display for ConnectorError
Source§impl Error for ConnectorError
impl Error for ConnectorError
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 ConnectorError
impl RefUnwindSafe for ConnectorError
impl Send for ConnectorError
impl Sync for ConnectorError
impl Unpin for ConnectorError
impl UnsafeUnpin for ConnectorError
impl UnwindSafe for ConnectorError
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