use thiserror::Error;
#[derive(Debug, Error, PartialEq)]
pub enum TaintError {
#[error("path {path} is blocked by taint {taint}: {reason}")]
Blocked {
path: String,
taint: String,
reason: String,
},
#[error("path {path} is quarantined; agent {agent_id} is not authorized")]
NotAuthorized { path: String, agent_id: String },
#[error("review taint {taint} on {path} requires confidence >= {required}; got {got}")]
InsufficientConfidence {
path: String,
taint: String,
required: f64,
got: f64,
},
#[error("taint {0} not found")]
NotFound(String),
#[error("taint {0} is already resolved")]
AlreadyResolved(String),
#[error("storage: {0}")]
Storage(String),
#[error("invalid taint: {0}")]
InvalidTaint(String),
}