aboutsummaryrefslogtreecommitdiffstats
path: root/lib/api-config/src/error.rs
blob: 6f7b09901169b478c0c2559bfba8077bf65669f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
use thiserror::Error;

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