1use thiserror::Error;
6
7#[derive(Error, Debug, Clone, PartialEq)]
9pub enum ContentError {
10 #[error("Invalid content type: {0}")]
11 InvalidContentType(String),
12
13 #[error("Template not found: {0}")]
14 TemplateNotFound(String),
15
16 #[error("Template parse error: {0}")]
17 TemplateParseFailed(String),
18
19 #[error("Token budget exceeded: {used} tokens exceeds {limit} limit")]
20 TokenBudgetExceeded { used: usize, limit: usize },
21
22 #[error("Validation failed: {0}")]
23 ValidationFailed(String),
24
25 #[error("Missing required field: {0}")]
26 MissingRequiredField(String),
27
28 #[error("Source context error: {0}")]
29 SourceContextError(String),
30
31 #[error("RAG context error: {0}")]
32 RagContextError(String),
33}