1
2
3
4
5
6
7
8
9
10
11
12
13
14
use serde_json::Error as SerdeJsonError;
use thiserror::Error;

#[derive(Error, Debug)]
pub enum PromptError {
    #[error("Variable {0} is missing from input variables")]
    MissingVariable(String),

    #[error("Serialization error: {0}")]
    SerializationError(#[from] SerdeJsonError),

    #[error("Error: {0}")]
    OtherError(String),
}