#[non_exhaustive]pub enum WebhookError {
InvalidSecret,
MissingHeader(HeaderName),
InvalidTimestamp,
TimestampOutOfTolerance,
NoMatchingSignature,
StreamingBody,
}Available on crate feature
webhooks only.Expand description
Why a webhook cannot be signed or does not verify.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidSecret
The secret is not whsec_ followed by base64.
MissingHeader(HeaderName)
The request lacks this header, or it is not text.
InvalidTimestamp
webhook-timestamp is not a number of seconds.
TimestampOutOfTolerance
webhook-timestamp is further from now than the tolerance: an old message replayed, or a clock that is off.
NoMatchingSignature
No v1 signature matches a secret.
StreamingBody
The body streams, so its bytes are not known before it is sent: it cannot be signed.
Trait Implementations§
Source§impl Clone for WebhookError
impl Clone for WebhookError
Source§impl Debug for WebhookError
impl Debug for WebhookError
Source§impl Display for WebhookError
impl Display for WebhookError
impl Eq for WebhookError
Source§impl Error for WebhookError
impl Error for WebhookError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for WebhookError
impl PartialEq for WebhookError
impl StructuralPartialEq for WebhookError
Auto Trait Implementations§
impl !Freeze for WebhookError
impl Forget for WebhookError
impl Move for WebhookError
impl RefUnwindSafe for WebhookError
impl Send for WebhookError
impl Sync for WebhookError
impl Unpin for WebhookError
impl UnsafeUnpin for WebhookError
impl UnwindSafe for WebhookError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more