llm_edge_routing/
error.rs

1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum RoutingError {
5    #[error("No providers available")]
6    NoProvidersAvailable,
7
8    #[error("All providers failed")]
9    AllProvidersFailed,
10
11    #[error("Circuit breaker open for provider: {0}")]
12    CircuitBreakerOpen(String),
13
14    #[error("Internal error: {0}")]
15    Internal(String),
16}
17
18pub type RoutingResult<T> = Result<T, RoutingError>;