use thiserror::Error;
#[derive(Error, Debug)]
pub enum ClientError {
#[error("error parsing endpoint into data: {0}")]
DataParseError(#[source] anyhow::Error),
#[error("server returned error with status {code}: {content}")]
ServerResponseError {
code: reqwest::StatusCode,
content: String,
},
#[error("error retrieving http response: {0}")]
ResponseError(#[source] anyhow::Error),
#[error("error building http request to {url}: {source}")]
RequestBuildError {
#[source]
source: anyhow::Error,
url: String,
},
}