use rialo_s_pubkey::Pubkey;
use thiserror::Error;
#[derive(Debug, Error)]
pub enum SubscriptionError {
#[error("subscription has no instructions")]
EmptyInstructions,
#[error("only the creator of the subscription (payer) can be a signer, found {0}")]
InvalidSigner(Pubkey),
#[error("too many accounts in subscription, max is {max_accounts}, got {actual}")]
TooManyAccounts { max_accounts: usize, actual: usize },
}
impl From<SubscriptionError> for rialo_s_instruction::error::InstructionError {
fn from(_: SubscriptionError) -> Self {
rialo_s_instruction::error::InstructionError::InvalidArgument
}
}