use crate::client::NvisyRtBuilderError;
use crate::model::ApiError;
#[non_exhaustive]
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("HTTP error: {0}")]
Http(#[from] reqwest_middleware::Error),
#[error("HTTP error: {0}")]
Reqwest(#[from] reqwest::Error),
#[error("Serialization error: {0}")]
Serialization(#[from] serde_json::Error),
#[error("Configuration error: {0}")]
Config(#[from] NvisyRtBuilderError),
#[error("URL parse error: {0}")]
UrlParse(#[from] url::ParseError),
#[cfg(feature = "base64")]
#[error("Encoding error: {0}")]
Encoding(#[from] base64::DecodeError),
#[error("{0}")]
Api(ApiError),
}
pub type Result<T, E = Error> = std::result::Result<T, E>;