1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! Typed error enum for the pipelin3r pipeline orchestrator.
/// Errors that can occur during pipeline execution.
#[derive(Debug, thiserror::Error)]
pub enum PipelineError {
/// An error from the shedul3r SDK.
#[error("SDK error: {0}")]
Sdk(#[from] shedul3r_rs_sdk::SdkError),
/// Authentication configuration is missing or invalid.
#[error("auth error: {0}")]
Auth(String),
/// Template rendering failed.
#[error("template error: {0}")]
Template(String),
/// Bundle creation or extraction failed.
#[error("bundle error: {0}")]
Bundle(String),
/// A shell command failed.
#[error("command failed: {0}")]
Command(String),
/// A data transform failed.
#[error("transform error: {0}")]
Transform(String),
/// Configuration is invalid.
#[error("config error: {0}")]
Config(String),
/// An agent invocation failed.
#[error("agent failed: {message}")]
AgentFailed {
/// Description of the failure.
message: String,
},
/// A batch had partial failures.
#[error("batch partial failure: {succeeded} succeeded, {failed} failed — {message}")]
BatchPartialFailure {
/// Number of tasks that succeeded.
succeeded: usize,
/// Number of tasks that failed.
failed: usize,
/// Summary message.
message: String,
},
/// An operation timed out.
#[error("timeout: {message}")]
Timeout {
/// Description of what timed out.
message: String,
},
/// A filesystem I/O operation failed.
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
/// Catch-all for errors that do not fit other variants.
#[error("{0}")]
Other(String),
}