rinfluxdb_flux/
client.rs

1// Copyright Claudio Mattera 2021.
2// Distributed under the MIT License or Apache 2.0 License at your option.
3// See accompanying files License-MIT.txt and License-Apache-2.0, or online at
4// https://opensource.org/licenses/MIT
5// https://opensource.org/licenses/Apache-2.0
6
7use thiserror::Error;
8
9use super::response::ResponseError;
10
11pub mod r#async;
12pub mod blocking;
13
14/// An error occurred during interfacing with an InfluxDB server
15#[derive(Error, Debug)]
16pub enum ClientError {
17    /// Error occurred inside Request library
18    #[error("Reqwest error")]
19    ReqwestError(#[from] reqwest::Error),
20
21    /// Error occurred while parsing a URL
22    #[error("URL parse error")]
23    UrlError(#[from] url::ParseError),
24
25    /// Error occurred while parsing a datetime
26    #[error("Chrono parse error")]
27    ParseDatetimeError(#[from] chrono::ParseError),
28
29    /// Error occurred while parsing format
30    #[error("Format parse error")]
31    ResponseError(#[from] ResponseError),
32}