aboutsummaryrefslogtreecommitdiffstats
path: root/crates/users/src/error.rs
blob: 1ff28ee3cc64ea5cf7cfc8d2af03e587b74d5543 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
use thiserror::Error;

#[derive(Error, Debug)]
pub enum UserError {
    #[error("data store disconnected")]
    Disconnect(#[from] std::io::Error),
    #[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,
}