switchboard_solana/
error.rs1use crate::prelude::*;
2
3#[error_code]
4#[derive(Eq, PartialEq)]
5pub enum SwitchboardError {
6 #[msg("Aggregator is not currently populated with a valid round")]
7 InvalidAggregatorRound,
8 #[msg("Failed to convert string to decimal format")]
9 InvalidStrDecimalConversion,
10 #[msg("Decimal conversion method failed")]
11 DecimalConversionError,
12 #[msg("An integer overflow occurred")]
13 IntegerOverflowError,
14 #[msg("Account discriminator did not match")]
15 AccountDiscriminatorMismatch,
16 #[msg("Vrf value is empty")]
17 VrfEmptyError,
18 #[msg("Failed to send requestRandomness instruction")]
19 VrfCpiError,
20 #[msg("Failed to send signed requestRandomness instruction")]
21 VrfCpiSignedError,
22 #[msg("Failed to deserialize account")]
23 AccountDeserializationError,
24 #[msg("Switchboard feed exceeded the staleness threshold")]
25 StaleFeed,
26 #[msg("Switchboard feed exceeded the confidence interval threshold")]
27 ConfidenceIntervalExceeded,
28 #[msg("Invalid authority provided to Switchboard account")]
29 InvalidAuthority,
30 #[msg("Switchboard value variance exceeded threshold")]
31 AllowedVarianceExceeded,
32 #[msg("Invalid function input")]
33 InvalidFunctionInput,
34 #[msg("Failed to compute the PDA")]
35 PdaDerivationError,
36 #[msg("Illegal Operation")]
37 IllegalExecuteAttempt,
38 #[msg("The provided enclave quote is invalid")]
39 InvalidQuote,
40 #[msg("The provided queue address did not match the expected address on-chain")]
41 InvalidQueue,
42 #[msg("The provided enclave_signer does not match the expected enclave_signer")]
43 InvalidEnclaveSigner,
44 #[msg("The provided mint did not match the wrapped SOL mint address")]
45 InvalidNativeMint,
46 #[msg("This account has zero mr_enclaves defined")]
47 MrEnclavesEmpty,
48 InvalidMrEnclave,
49 #[msg("The FunctionAccount status is not active (1)")]
50 FunctionNotReady,
51 #[msg("The FunctionAccount has set requests_disabled to true and disabled this action")]
52 UserRequestsDisabled,
53 FunctionRoutinesDisabled,
54 #[msg(
55 "The PermissionAccount is missing the required flags for this action. Check the queues config to see which permissions are required"
56 )]
57 PermissionDenied,
58 ConfigParameterLocked,
59 #[msg("The function authority has disabled service execution for this function")]
60 FunctionServicesDisabled,
61 #[msg("The service has been disabled. Please check the service's is_disabled status for more information.")]
62 ServiceDisabled,
63 #[msg("The service worker already has the maximum number of services (128)")]
64 ServiceWorkerFull,
65 #[msg("The service worker is already using its max enclave space for a set of services")]
66 ServiceWorkerEnclaveFull,
67 #[msg("Service is already being executed by a worker. Please remove the service before adding to a new service worker")]
68 ServiceAlreadyAssignedToWorker,
69 NetworkError,
70}
71
72impl std::error::Error for SwitchboardError {}