#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum Error {
#[error("invalid pattern in rule `{id}`: {source}")]
InvalidPattern {
id: String,
#[source]
source: Box<regex::Error>,
},
#[error("duplicate rule id `{0}`")]
DuplicateRuleId(String),
#[error("rule at index {0} has an empty id")]
EmptyRuleId(usize),
#[error("failed to parse rules: {0}")]
RulesParse(#[from] toml::de::Error),
#[error("invalid JSON schema: {0}")]
InvalidSchema(String),
#[error("invalid allow-list pointer `{0}`: must start with '/'")]
InvalidPointer(String),
}