use thiserror::Error;
#[derive(Error, Debug)]
#[non_exhaustive]
pub enum Error {
#[error("{io}: {path}")]
FromPath {
#[source]
io: std::io::Error,
path: String,
},
#[error(transparent)]
InvalidHeaderName(#[from] http::header::InvalidHeaderName),
#[error(transparent)]
InvalidHeaderValue(#[from] http::header::InvalidHeaderValue),
#[error(transparent)]
InvalidMethod(#[from] http::method::InvalidMethod),
#[error(transparent)]
Join(#[from] tokio::task::JoinError),
#[error(transparent)]
Io(#[from] std::io::Error),
#[cfg(feature = "store")]
#[error(transparent)]
ObjectStore(#[from] object_store::Error),
#[cfg(feature = "geoparquet")]
#[error(transparent)]
Parquet(#[from] parquet::errors::ParquetError),
#[error(transparent)]
Reqwest(#[from] reqwest::Error),
#[error(transparent)]
SerdeJson(#[from] serde_json::Error),
#[error(transparent)]
Stac(#[from] stac::Error),
#[error(transparent)]
TryFromInt(#[from] std::num::TryFromIntError),
#[error("unsupported format: {0}")]
UnsupportedFormat(String),
#[error(transparent)]
UrlParse(#[from] url::ParseError),
}