langchain_rust/prompt/error.rs
1use serde_json::Error as SerdeJsonError;
2use thiserror::Error;
3
4#[derive(Error, Debug)]
5#[non_exhaustive]
6pub enum PromptError {
7 #[error("Variable {0} is missing from input variables")]
8 MissingVariable(String),
9
10 #[error("Serialization error: {0}")]
11 SerializationError(#[from] SerdeJsonError),
12
13 #[error("Error: {0}")]
14 OtherError(String),
15}