async-stripe-webhook 1.0.0-rc.5

API bindings for the Stripe HTTP API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::num::ParseIntError;

/// An error encountered when communicating with the Stripe API webhooks.
#[derive(Debug, thiserror::Error)]
pub enum WebhookError {
    #[error("invalid key length")]
    BadKey,
    #[error("error parsing timestamp")]
    BadHeader(#[from] ParseIntError),
    #[error("error comparing signatures")]
    BadSignature,
    #[error("error comparing timestamps - over tolerance")]
    BadTimestamp(i64),
    #[error("error parsing event object: {0}")]
    BadParse(String),
}