libbrat_workflow/
error.rs1use thiserror::Error;
4
5#[derive(Debug, Error)]
7pub enum WorkflowError {
8 #[error("workflow not found: {0}")]
10 NotFound(String),
11
12 #[error("failed to read workflow: {0}")]
14 ReadError(#[from] std::io::Error),
15
16 #[error("failed to parse workflow YAML: {0}")]
18 ParseError(#[from] serde_yaml::Error),
19
20 #[error("workflow validation failed: {0}")]
22 ValidationError(String),
23
24 #[error("missing required input: {0}")]
26 MissingInput(String),
27
28 #[error("invalid input '{0}': {1}")]
30 InvalidInput(String, String),
31
32 #[error("circular dependency detected in workflow steps")]
34 CircularDependency,
35
36 #[error("unknown step '{0}' referenced in 'needs'")]
38 UnknownStep(String),
39
40 #[error("grite error: {0}")]
42 GriteError(#[from] libbrat_grite::GriteError),
43
44 #[error("workflow directory not found: {0}")]
46 WorkflowDirNotFound(String),
47}