1use thiserror::Error;
3
4#[derive(Debug, Error)]
6pub enum DiffError {
7 #[error("Version '{0}' not found in store")]
9 VersionNotFound(String),
10 #[error("Cannot rollback to version '{0}': no path exists")]
12 RollbackFailed(String),
13 #[error("Output too large: {size} tokens exceeds limit {limit}")]
15 OutputTooLarge { size: usize, limit: usize },
16 #[error("Serialization error: {0}")]
18 Serialization(#[from] serde_json::Error),
19 #[error("Invalid diff: {0}")]
21 InvalidDiff(String),
22 #[error("Content address collision for '{0}'")]
24 ContentAddressCollision(String),
25 #[error("Branch '{0}' not found")]
27 BranchNotFound(String),
28}