use thiserror::Error;
#[derive(Error, Debug)]
pub enum LangSmithError {
#[error("Configuration error: {0}")]
Config(String),
#[error("HTTP error: {0}")]
Http(#[from] reqwest::Error),
#[error("Serialization error: {0}")]
Serialization(#[from] serde_json::Error),
#[error("Tracing is disabled")]
TracingDisabled,
#[error("Invalid UUID: {0}")]
InvalidUuid(#[from] uuid::Error),
#[error("Other error: {0}")]
Other(String),
}
pub type Result<T> = std::result::Result<T, LangSmithError>;