1use std::collections::HashMap;
2use thiserror::Error;
3
4#[derive(Debug, Error)]
5pub enum AdminError {
6 #[error("not found")]
7 NotFound,
8
9 #[error("validation error: {0:?}")]
10 ValidationError(HashMap<String, String>),
11
12 #[error("database error: {0}")]
13 DatabaseError(String),
14
15 #[error("unauthorized")]
16 Unauthorized,
17
18 #[error("conflict: {0}")]
19 Conflict(String),
20
21 #[error("error: {0}")]
22 Custom(String),
23
24 #[error("internal error: {0}")]
25 Internal(String),
26}