troupekit_host/error.rs
1use troupekit_core::error::CoreError;
2use troupekit_core::ids::RunId;
3use troupekit_graph::GraphError;
4
5/// Why a host call failed: a graph error (bad checkpoint, resume that does
6/// not fit), a store or queue failure, or a run with no checkpoint.
7/// A run that fails during a step is not an error: its job fails instead.
8#[derive(Debug, Clone, PartialEq, thiserror::Error)]
9pub enum HostError {
10 #[error(transparent)]
11 Graph(#[from] GraphError),
12 #[error(transparent)]
13 Store(#[from] CoreError),
14 #[error("run {0} has no checkpoint")]
15 NoCheckpoint(RunId),
16}