hpl_hive_control/
errors.rs

1use anchor_lang::prelude::error_code;
2
3#[error_code]
4pub enum HplHiveControlError {
5    #[msg("Invalid Program")]
6    InvalidProgram,
7
8    #[msg("The signer is not authorized to perform this action.")]
9    Unauthorized,
10
11    #[msg("CPI happened from an unknown program")]
12    UnknownCPI,
13
14    #[msg("Action not allowed for this program")]
15    UnallowedAction,
16
17    #[msg("Project does not have enough funds to subsidize")]
18    InsufficientSubsidyFunds,
19
20    #[msg("Too many addresses provided.")]
21    TooManyAddresses,
22
23    #[msg("Unexpected address container role for the action.")]
24    WrongAddressContainerRole,
25
26    #[msg("Merkle Tree must be provided in context for this particular action")]
27    MissingMerkleTree,
28
29    #[msg("Invalid Value Type")]
30    InvalidValueType,
31
32    #[msg("Expected merkle trees not found in global config")]
33    TreesNotFound,
34
35    #[msg("Couldn't find tree at active index")]
36    InvalidTreeIndex,
37
38    #[msg("Tree provided in context is not active at the moment")]
39    TreeNotActive,
40
41    #[msg("Tree does not have any capacity to add more leaves")]
42    TreeFull,
43
44    #[msg("User must have at least one wallet associated")]
45    WalletsCannotBeEmpty,
46
47    #[msg("Constant authority mismatch")]
48    ConstAuthorityMismatch,
49
50    #[msg("Tree not found")]
51    TreeNotFound,
52
53    #[msg("Criteria not found")]
54    CriteriaNotFound,
55
56    #[msg("Criteria claim is not started started")]
57    CriteriaClaimIsNotStarted,
58
59    #[msg("Criteria claim is now ended")]
60    CriteriaClaimIsNowEnded,
61
62    #[msg("Invalid Badge Criteria")]
63    InvalidBadgeCriteria,
64
65    #[msg("Civic verification failed")]
66    CivicVerificationFailed,
67
68    #[msg("Gatekeeper token not provided in context")]
69    GatewayTokenNotProvided,
70
71    #[msg("Social info is required when removing a wallet")]
72    SocialInfoRequiredWithWalletRemoval,
73
74    #[msg("Last wallet cannot be removed from user")]
75    CannotRemoveLastWallet,
76
77    #[msg("The Badge that you are trying to assign does not exist")]
78    InvalidBadge,
79
80    #[msg("Solana Gateway verification error")]
81    GatewayError,
82}