use thiserror::Error;
#[derive(Error, Debug)]
pub enum TalktoSCError {
#[error("Failed to create a context {0}")]
ContextError(String),
#[error("Failed to list readers: {0}")]
ReaderError(String),
#[error("No reader is connected.")]
MissingReaderError,
#[error("No smartcard is attached to the reader.")]
MissingSmartCardError,
#[error("Failed to connect to the card: {0}")]
SmartCardConnectionError(String),
#[error("Error in the response length: {0}")]
ResponseError(usize),
#[error("Failed to verify the pin")]
PinError,
#[error("Failed to change OTP mode")]
OtpError,
}