use thiserror::Error;
#[non_exhaustive]
#[derive(Debug, Error)]
pub enum SkillError {
#[error("invalid request: {0}")]
InvalidRequest(String),
#[error("internal: {0}")]
Internal(String),
}
#[non_exhaustive]
#[derive(Debug, Error)]
pub enum SinkError {
#[error("sink closed")]
Closed,
#[error("sink backend: {0}")]
Backend(String),
}
#[non_exhaustive]
#[derive(Debug, Error)]
pub enum ManifestError {
#[error("manifest parse error at {location}: {reason}")]
Parse { location: String, reason: String },
#[error("schema validation error at {location}: {reason}")]
Schema { location: String, reason: String },
}
#[non_exhaustive]
#[derive(Debug, Error)]
pub enum RenderError {
#[error("missing template variable `{path}` at offset {offset}")]
MissingVariable { path: String, offset: usize },
#[error("template syntax error at offset {offset}: {reason}")]
Syntax { offset: usize, reason: String },
}
#[non_exhaustive]
#[derive(Debug, Error)]
pub enum ValidationError {
#[error("schema validation failed at {location}: {reason}")]
Invalid { location: String, reason: String },
#[error("unsupported JSON Schema keyword `{keyword}`")]
UnsupportedKeyword { keyword: String },
}