Skip to main content

anyllm_translate/
error.rs

1use thiserror::Error;
2
3/// Errors that can occur during API format translation.
4#[derive(Error, Debug, Clone)]
5pub enum TranslateError {
6    /// The model name did not match any entry in the translation config.
7    #[error("unknown model: {0}")]
8    UnknownModel(String),
9
10    /// A translation step failed (validation, unsupported feature with strict config, etc.).
11    #[error("translation error: {0}")]
12    Translation(String),
13
14    /// A required field was missing from the input.
15    #[error("missing field: {0}")]
16    MissingField(String),
17}