Skip to main content

shardline_cache/
error.rs

1use std::num::TryFromIntError;
2
3use thiserror::Error;
4
5/// Reconstruction cache adapter failure.
6#[derive(Debug, Error)]
7pub enum ReconstructionCacheError {
8    /// The configured Redis URL was empty.
9    #[error("reconstruction cache redis url must not be empty")]
10    EmptyRedisUrl,
11    /// Redis client initialization or operations failed.
12    #[error("reconstruction cache redis operation failed")]
13    Redis(#[from] redis::RedisError),
14    /// Numeric conversion exceeded supported bounds.
15    #[error("reconstruction cache numeric conversion exceeded supported bounds")]
16    NumericConversion(#[from] TryFromIntError),
17    /// The adapter reported a generic operational failure.
18    #[error("reconstruction cache adapter operation failed")]
19    Operation,
20}