1use thiserror::Error;
2
3#[derive(Error, Debug)]
5#[non_exhaustive]
6pub enum Error {
7 #[error("error when getting href={href}: {message}")]
9 Get {
10 href: String,
12
13 message: String,
15 },
16
17 #[error("{0} is not enabled")]
19 FeatureNotEnabled(&'static str),
20
21 #[error("{io}: {path}")]
23 FromPath {
24 #[source]
26 io: std::io::Error,
27
28 path: String,
30 },
31
32 #[error(transparent)]
34 Io(#[from] std::io::Error),
35
36 #[cfg(feature = "store")]
37 #[error(transparent)]
38 ObjectStore(#[from] object_store::Error),
40
41 #[cfg(feature = "geoparquet")]
42 #[error(transparent)]
43 Parquet(#[from] parquet::errors::ParquetError),
45
46 #[cfg(feature = "reqwest")]
47 #[error(transparent)]
48 Reqwest(#[from] reqwest::Error),
50
51 #[error(transparent)]
52 SerdeJson(#[from] serde_json::Error),
54
55 #[error(transparent)]
56 Stac(#[from] stac::Error),
58
59 #[error("unsupported format: {0}")]
61 UnsupportedFormat(String),
62
63 #[error(transparent)]
65 UrlParse(#[from] url::ParseError),
66}