hitbox/error.rs
1//! Error implementation and transformations.
2use thiserror::Error;
3
4/// Base hitbox error.
5#[derive(Error, Debug)]
6pub enum CacheError {
7 /// Error described all problems with cache backend interactions.
8 #[error(transparent)]
9 BackendError(#[from] hitbox_backend::BackendError),
10 /// Wrapper for upstream errors.
11 #[error("Upstream error: {0}")]
12 UpstreamError(Box<dyn std::error::Error + Send>),
13 /// Wrapper error for problems with cache key generation.
14 #[error("Cache key generation error")]
15 CacheKeyGenerationError(String),
16}