aboutsummaryrefslogtreecommitdiffstats
path: root/lib/shared-svc/src/lib.rs
blob: 92d9c32f394a8e1fad21639c6539bf291dd4a928 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[cfg(feature = "cache")]
pub mod cache;

use thiserror::Error;

#[derive(Error, Debug)]
pub enum ServiceError {
    #[error("data store disconnected")]
    Cache(#[from] redis::RedisError),
    #[error("the data for key `{0}` is not available")]
    Redaction(String),
    #[error("invalid header (expected {expected:?}, found {found:?})")]
    InvalidHeader { expected: String, found: String },
    #[error("unknown data store error")]
    Unknown,
}