Files
horus/lib/clients/coordinator/src/error.rs
Timur Gordon f66edba1d3 Add coordinator client library, installation scripts, and new test runners
- Add coordinator client library to workspace
- Add installation documentation and heroscript
- Add new test runners for Osiris and Sal
- Update hero runner test to handle invalid heroscript errors
- Update README with installation instructions
2025-11-17 10:56:13 +01:00

43 lines
954 B
Rust

//! Error types for the Coordinator client
use thiserror::Error;
/// Result type for coordinator operations
pub type Result<T> = std::result::Result<T, CoordinatorError>;
/// Errors that can occur when interacting with the Coordinator
#[derive(Debug, Error)]
pub enum CoordinatorError {
/// Connection error
#[error("Connection error: {0}")]
Connection(String),
/// RPC error
#[error("RPC error: {0}")]
Rpc(String),
/// Resource already exists
#[error("Resource already exists")]
AlreadyExists,
/// Resource not found
#[error("Not found: {0}")]
NotFound(String),
/// Storage error
#[error("Storage error: {0}")]
Storage(String),
/// DAG error
#[error("DAG error: {0}")]
Dag(String),
/// Timeout error
#[error("Timeout: {0}")]
Timeout(String),
/// Serialization error
#[error("Serialization error: {0}")]
Serialization(#[from] serde_json::Error),
}