1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
use anchor_lang::prelude::*;

#[error_code]
pub enum CandyError {
    #[msg("Account does not have correct owner")]
    IncorrectOwner,
    #[msg("Account is not initialized")]
    Uninitialized,
    #[msg("Mint Mismatch")]
    MintMismatch,
    #[msg("Index greater than length")]
    IndexGreaterThanLength,
    #[msg("Numerical overflow error")]
    NumericalOverflowError,
    #[msg("Can only provide up to 4 creators to candy machine (because candy machine is one)")]
    TooManyCreators,
    #[msg("Candy machine is empty")]
    CandyMachineEmpty,
    #[msg("Candy machines using hidden uris do not have config lines, they have a single hash representing hashed order")]
    HiddenSettingsDoNotHaveConfigLines,
    #[msg("Cannot change number of lines unless is a hidden config")]
    CannotChangeNumberOfLines,
    #[msg("Cannot switch to hidden settings after items available is greater than 0")]
    CannotSwitchToHiddenSettings,
    #[msg("Incorrect collection NFT authority")]
    IncorrectCollectionAuthority,
    #[msg("The metadata account has data in it, and this must be empty to mint a new NFT")]
    MetadataAccountMustBeEmpty,
    #[msg("Can't change collection settings after items have begun to be minted")]
    NoChangingCollectionDuringMint,
    #[msg("Value longer than expected maximum value")]
    ExceededLengthError,
    #[msg("Missing config lines settings")]
    MissingConfigLinesSettings,
    #[msg("Cannot increase the length in config lines settings")]
    CannotIncreaseLength,
    #[msg("Cannot switch from hidden settings")]
    CannotSwitchFromHiddenSettings,
    #[msg("Cannot change sequential index generation after items have begun to be minted")]
    CannotChangeSequentialIndexGeneration,
    #[msg("Collection public key mismatch")]
    CollectionKeyMismatch,
    #[msg("Could not retrive config line data")]
    CouldNotRetrieveConfigLineData,
    #[msg("Not all config lines were added to the candy machine")]
    NotFullyLoaded,
}