cache_fn/error.rs
1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum CacheError {
5 #[error("Network error: {0}")]
6 Network(#[from] reqwest::Error),
7
8 #[error("Serialization error: {0}")]
9 Serialization(#[from] serde_json::Error),
10
11 #[error("Cache error: {0}")]
12 Cache(String),
13
14 #[error("Worker returned error: {0}")]
15 Worker(String),
16}