security_token_client/generated/errors/
security_token_program.rs1use num_derive::FromPrimitive;
9use thiserror::Error;
10
11#[derive(Clone, Debug, Eq, Error, FromPrimitive, PartialEq)]
12pub enum SecurityTokenProgramError {
13 #[error("Verification program not found")]
15 VerificationProgramNotFound = 0x1,
16 #[error("Not enough accounts for verification")]
18 NotEnoughAccountsForVerification = 0x2,
19 #[error("Account intersection mismatch")]
21 AccountIntersectionMismatch = 0x3,
22 #[error("Invalid Verification Config PDA")]
24 InvalidVerificationConfigPda = 0x4,
25 #[error("Cannot modify external metadata account")]
27 CannotModifyExternalMetadataAccount = 0x5,
28 #[error("Internal metadata storage requires metadata to be provided")]
30 InternalMetadataRequiresData = 0x6,
31 #[error("External metadata storage cannot accept metadata data in this instruction")]
33 ExternalMetadataForbidsData = 0x7,
34}
35
36impl From<SecurityTokenProgramError> for solana_program_error::ProgramError {
37 fn from(e: SecurityTokenProgramError) -> Self {
38 solana_program_error::ProgramError::Custom(e as u32)
39 }
40}