Enum prometheus_http_query::error::Error
source · #[non_exhaustive]pub enum Error {
Client(ClientError),
Prometheus(PrometheusError),
EmptySeriesSelector,
ParseUrl(ParseUrlError),
}Expand description
A global error enum that encapsulates other more specific types of errors.
Some variants contain errors that in turn wrap errors from underlying libraries
like reqwest. These errors can be obtained from Error::source().
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Client(ClientError)
Wraps errors from the underlying reqwest::Client that cannot be mapped
to a more specific error type. Deserialization errors also fall into this
category.
Prometheus(PrometheusError)
Occurs when Prometheus responds with e.g. HTTP 4xx (e.g. due to a syntax error in a PromQL query).
Details on the error as reported by Prometheus are included in PrometheusError.
EmptySeriesSelector
Occurs when the Client::series method is called with an empty set of
series Selectors. According to the Prometheus API description at least one
Selector must be provided.
ParseUrl(ParseUrlError)
Wraps errors from the url crate.