1#[derive(Debug, thiserror::Error)]
4#[non_exhaustive]
5pub enum Error {
6 #[error("invalid pattern in rule `{id}`: {source}")]
8 InvalidPattern {
9 id: String,
11 #[source]
13 source: Box<regex::Error>,
14 },
15 #[error("duplicate rule id `{0}`")]
17 DuplicateRuleId(String),
18 #[error("rule at index {0} has an empty id")]
20 EmptyRuleId(usize),
21 #[error("failed to parse rules: {0}")]
23 RulesParse(#[from] toml::de::Error),
24 #[error("invalid JSON schema: {0}")]
26 InvalidSchema(String),
27 #[error("invalid allow-list pointer `{0}`: must start with '/'")]
29 InvalidPointer(String),
30}