use thiserror::Error;
#[derive(Debug, Error)]
pub enum FeaturesError {
#[error("Collection not found: {0}")]
CollectionNotFound(String),
#[error("Invalid bbox: {0}")]
InvalidBbox(String),
#[error("Invalid datetime: {0}")]
InvalidDatetime(String),
#[error("Invalid CRS: {0}")]
InvalidCrs(String),
#[error("Limit {requested} exceeds maximum allowed {max}")]
LimitExceeded {
requested: u32,
max: u32,
},
#[error("JSON error: {0}")]
SerdeError(#[from] serde_json::Error),
#[error("CQL2 parse error: {0}")]
CqlParseError(String),
}