#[non_exhaustive]pub enum QueryError {
Overloaded {
attempts: u32,
source: Box<Error<QueryError>>,
},
Submit(Error<QueryError>),
AsyncRequested,
Async(Box<AsyncQueryResponse>),
Poll(Error<GetResultError>),
Result(ResultError),
}Expand description
Error returned by the enhanced query (Client::query
/ [execute_query]).
Marked #[non_exhaustive]: new variants may be added without a breaking
change, so downstream matches should carry a wildcard arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Overloaded
HTTP 429 (OVERLOADED) retries were exhausted (by retry count or by the
deadline budget). Distinct from a generic 503 so callers can treat
transient admission shedding differently from a hard resource error.
Fields
source: Box<Error<QueryError>>The last 429 response, for context.
Submit(Error<QueryError>)
Query submission failed with a non-429 status, or a transport/decode
error occurred. Carries the same error shape as the generated query op,
so all non-overload errors propagate unchanged.
AsyncRequested
query was called on a request with
async = true. That opts into an asynchronous submission whose
acknowledgement the synchronous-results path cannot return, so the request
is rejected up front (before any round-trip). Use
Client::submit_query for async queries.
Async(Box<AsyncQueryResponse>)
The server fell back to asynchronous execution (HTTP 202) — e.g. a request
with async_after_ms whose synchronous attempt timed out — so there are
no inline rows to return. The acknowledgement (carrying the
query_run_id to poll) is passed through untouched; or call
Client::submit_query directly.
Poll(Error<GetResultError>)
An API error while polling or paginating the result during auto-follow (other than the 409 that signals a failed result).
Result(ResultError)
A result-lifecycle error during auto-follow. Match this to handle the
whole ResultError family at once.
Trait Implementations§
Source§impl Debug for QueryError
impl Debug for QueryError
Source§impl Display for QueryError
impl Display for QueryError
Source§impl Error for QueryError
impl Error for QueryError
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()