use serde_json::{Map, Value};
use thiserror::Error;
#[derive(Debug, Error)]
#[non_exhaustive]
pub enum Error {
#[error("cannot convert queries to strings")]
CannotConvertQueryToString(Map<String, Value>),
#[error("cannot convert cql2-json to strings")]
CannotConvertCql2JsonToString(Map<String, Value>),
#[error(transparent)]
ParseIntError(#[from] std::num::ParseIntError),
#[error(transparent)]
ParseFloatError(#[from] std::num::ParseFloatError),
#[error(transparent)]
SerdeJson(#[from] serde_json::Error),
#[error(transparent)]
SerdeUrlencodedSer(#[from] serde_urlencoded::ser::Error),
#[error(transparent)]
TryFromInt(#[from] std::num::TryFromIntError),
#[error(transparent)]
UrlParse(#[from] url::ParseError),
}