langsmith_rust/
error.rs

1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum LangSmithError {
5    #[error("Configuration error: {0}")]
6    Config(String),
7
8    #[error("HTTP error: {0}")]
9    Http(#[from] reqwest::Error),
10
11    #[error("Serialization error: {0}")]
12    Serialization(#[from] serde_json::Error),
13
14    #[error("Tracing is disabled")]
15    TracingDisabled,
16
17    #[error("Invalid UUID: {0}")]
18    InvalidUuid(#[from] uuid::Error),
19
20    #[error("Other error: {0}")]
21    Other(String),
22}
23
24pub type Result<T> = std::result::Result<T, LangSmithError>;
25