1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum AuthError {
5 #[error("MongoDB find API error. {0}")]
6 MongoFind(mongodb::error::Error),
7 #[error("MongoDB find one API error. {0}")]
8 MongoFindOne(mongodb::error::Error),
9 #[error("Could not parse MongoDB URI. {0}")]
10 MongoParseUri(mongodb::error::Error),
11 #[error("Could not create MongoDB client. {0}")]
12 MongoCreateClient(mongodb::error::Error),
13 #[error("Could not read MongoDB cursor. {0}")]
14 MongoReadCursor(mongodb::error::Error),
15 #[error("Could not watch a MongoDB watch stream. {0}")]
16 MongoWatchChangeStream(mongodb::error::Error),
17 #[error("Missing APP in database.")]
18 MissingAppInDatabase,
19 #[error("Invalid Unicode string.")]
20 InvalidUnicodeString,
21 #[error("Invalid authorization path: {0}")]
22 InvalidAuthPath(String),
23 #[error("Missing value.")]
24 MissingValue,
25 #[error("Missing parent path.")]
26 MissingParentPath,
27 #[error("Missing value name.")]
28 MissingValueName,
29 #[error("Missing value extension.")]
30 MissingValueExtension,
31 #[error("Missing last item.")]
32 MissingLastItem,
33 #[error("Invalid data value type.")]
34 InvalidDataValueType,
35}