use thiserror::Error;
#[derive(Debug, Error)]
pub enum Error {
#[error("query is invalid: {error}")]
InvalidQueryError { error: String },
#[error("Failed to build URL: {error}")]
UrlConstructionError { error: String },
#[error("http protocol error: {error}")]
ProtocolError { error: String },
#[error("http protocol error: {error}")]
DeserializationError { error: String },
#[error("InfluxDB encountered the following error: {error}")]
DatabaseError { error: String },
#[error("authentication error. No or incorrect credentials")]
AuthenticationError,
#[error("authorization error. User not authorized")]
AuthorizationError,
#[error("connection error: {error}")]
ConnectionError { error: String },
}