#[derive(Debug)]
pub enum LlmRouterError
{
ServerStart(String),
KeyFetch(String),
Forward(String),
InvalidToken,
}
impl std::fmt::Display for LlmRouterError
{
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result
{
match self
{
Self::ServerStart(msg) => write!(f, "Server start failed: {}", msg),
Self::KeyFetch(msg) => write!(f, "Key fetch failed: {}", msg),
Self::Forward(msg) => write!(f, "Forward failed: {}", msg),
Self::InvalidToken => write!(f, "Invalid or missing authentication token"),
}
}
}
impl std::error::Error for LlmRouterError {}