drive/error/
identity.rs

1/// Identity errors
2#[derive(Debug, thiserror::Error)]
3pub enum IdentityError {
4    /// Identity already exists error
5    #[error("identity already exists error: {0}")]
6    IdentityAlreadyExists(&'static str),
7
8    /// Identity already exists error
9    #[error("identity key already exists for user error: {0}")]
10    IdentityKeyAlreadyExists(String),
11
12    /// A user is requesting an unknown key error
13    #[error("identity public key not found: {0}")]
14    IdentityPublicKeyNotFound(String),
15
16    /// A unique key with that hash already exists
17    #[error("a unique key with that hash already exists: {0}")]
18    UniqueKeyAlreadyExists(String),
19
20    /// Missing required key error
21    #[error("missing required key: {0}")]
22    MissingRequiredKey(&'static str),
23
24    /// Identity key missing field error
25    #[error("identity key missing field: {0}")]
26    IdentityKeyMissingField(&'static str),
27
28    /// Field requirement unmet error
29    #[error("field requirement unmet: {0}")]
30    FieldRequirementUnmet(&'static str),
31
32    /// Invalid identity structure error
33    #[error("invalid identity structure: {0}")]
34    InvalidIdentityStructure(&'static str),
35
36    /// Identity serialization error
37    #[error("identity serialization error: {0}")]
38    IdentitySerialization(&'static str),
39
40    /// Identity insufficient balance error
41    #[error("identity insufficient balance error: {0}")]
42    IdentityInsufficientBalance(String),
43
44    /// Critical balance overflow error
45    #[error("critical balance overflow error: {0}")]
46    CriticalBalanceOverflow(&'static str),
47
48    /// Identity Contract revision nonce error
49    #[error("identity contract revision nonce error: {0}")]
50    IdentityNonceError(&'static str),
51
52    /// Identity key incorrect query missing information error
53    #[error("identity key incorrect query missing information error: {0}")]
54    IdentityKeyIncorrectQueryMissingInformation(&'static str),
55
56    /// Identity key bounds error
57    #[error("identity key bounds error: {0}")]
58    IdentityKeyBoundsError(&'static str),
59
60    /// Identity Key Data Contract Not Found
61    #[error("contract with specified identifier is not found for identity key data contract")]
62    IdentityKeyDataContractNotFound,
63}