#[derive(thiserror::Error, Debug)]
pub enum OpenIdError {
#[error("Reqwest error: {0}")]
Reqwest(#[from] reqwest::Error),
#[error("Serde json error: {0}")]
SerdeJson(#[from] serde_json::Error),
#[error("Base64 decoding error: {0}")]
Base64Decode(#[from] base64::DecodeError),
#[cfg(feature = "crypto-wrapper")]
#[error("State error: invalid IP")]
StateErrorInvalidIP,
#[cfg(feature = "crypto-wrapper")]
#[error("State error: expired")]
StateErrorExpired,
#[cfg(feature = "crypto-wrapper")]
#[error("Rkyv error: {0}")]
RkyvError(#[from] rkyv::rancor::Error),
#[cfg(feature = "crypto-wrapper")]
#[error("Input string is smaller than nonce!")]
DecInputStringSmallerThanNonce,
#[cfg(feature = "crypto-wrapper")]
#[error("Failed to decrypt wrapped data!")]
DecryptWrappedData,
}