INNER CODE UNIT · Rust
source
cloudflare/web-bot-auth · crates/web-bot-auth/src/lib.rs:119
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match self {
ImplementationError::ImpossibleSfvError(e) => Some(e),
ImplementationError::FailedToVerify(e) => Some(e),
ImplementationError::WebBotAuth(e) => Some(e),
_ => None,
}
}
}
/// Errors thrown when verifying a Web Bot Auth-signed message specifically.
#[derive(Debug)]
pub enum WebBotAuthError {
/// Thrown when the signature is detected to be expired, using the `expires`
/// and `created` parameters.
SignatureIsExpired,
/// Thrown when `created` is still in the future.
SignatureCreatedInFuture,