#[non_exhaustive]
#[derive(thiserror::Error, Debug)]
pub enum CogError {
#[error(transparent)]
Tiles(#[from] cog_tiles::CogError),
#[error("{location} produces {format:?} tiles, which Martin cannot serve")]
UnsupportedFormat {
location: String,
format: cog_tiles::TileFormat,
},
#[error("Unable to encode a tile: {join}")]
Encode {
#[source]
join: tokio::task::JoinError,
},
}
impl crate::Classify for CogError {
fn kind(&self) -> crate::ErrorKind {
crate::ErrorKind::Internal
}
}