Skip to main content

security_token_client/generated/errors/
security_token_program.rs

1//! This code was AUTOGENERATED using the codama library.
2//! Please DO NOT EDIT THIS FILE, instead use visitors
3//! to add features, then rerun codama to update it.
4//!
5//! <https://github.com/codama-idl/codama>
6//!
7
8use num_derive::FromPrimitive;
9use thiserror::Error;
10
11#[derive(Clone, Debug, Eq, Error, FromPrimitive, PartialEq)]
12pub enum SecurityTokenProgramError {
13    /// 1 - Verification program not found
14    #[error("Verification program not found")]
15    VerificationProgramNotFound = 0x1,
16    /// 2 - Not enough accounts for verification
17    #[error("Not enough accounts for verification")]
18    NotEnoughAccountsForVerification = 0x2,
19    /// 3 - Account intersection mismatch
20    #[error("Account intersection mismatch")]
21    AccountIntersectionMismatch = 0x3,
22    /// 4 - Invalid Verification Config PDA
23    #[error("Invalid Verification Config PDA")]
24    InvalidVerificationConfigPda = 0x4,
25    /// 5 - Cannot modify external metadata account
26    #[error("Cannot modify external metadata account")]
27    CannotModifyExternalMetadataAccount = 0x5,
28    /// 6 - Internal metadata storage requires metadata to be provided
29    #[error("Internal metadata storage requires metadata to be provided")]
30    InternalMetadataRequiresData = 0x6,
31    /// 7 - External metadata storage cannot accept metadata data in this instruction
32    #[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}