use thiserror::Error;
#[derive(Debug, Error)]
pub enum WelError {
#[error("invalid JSON pointer: {0}")]
InvalidPointer(String),
#[error("path not found: {0}")]
PathNotFound(String),
#[error("type mismatch at {path}: expected {expected}, got {actual}")]
TypeMismatch {
path: String,
expected: String,
actual: String,
},
#[error("invalid regex pattern: {0}")]
InvalidRegex(#[from] regex::Error),
#[error("transform failed at {path}: {message}")]
TransformFailed { path: String, message: String },
#[error("unknown predicate: {0}")]
UnknownPredicate(String),
#[error("schema reference not found: {0}")]
RefNotFound(String),
#[error("JSON error: {0}")]
Json(#[from] serde_json::Error),
}
pub type Result<T> = std::result::Result<T, WelError>;