llm_optimizer_decision/
errors.rs1use thiserror::Error;
4
5pub type Result<T> = std::result::Result<T, DecisionError>;
6
7#[derive(Error, Debug)]
8pub enum DecisionError {
9 #[error("Invalid experiment configuration: {0}")]
10 InvalidConfig(String),
11
12 #[error("Invalid parameter: {0}")]
13 InvalidParameter(String),
14
15 #[error("Insufficient data: {0}")]
16 InsufficientData(String),
17
18 #[error("Statistical error: {0}")]
19 StatisticalError(String),
20
21 #[error("Variant not found: {0}")]
22 VariantNotFound(String),
23
24 #[error("Experiment not found: {0}")]
25 ExperimentNotFound(String),
26
27 #[error("Invalid state: {0}")]
28 InvalidState(String),
29
30 #[error("Allocation error: {0}")]
31 AllocationError(String),
32
33 #[error(transparent)]
34 Other(#[from] anyhow::Error),
35}