#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("stripe config error: {0}")]
Config(String),
#[error("stripe API error: {0}")]
Stripe(String),
#[error("no Stripe Connect account linked to this tenant")]
NoConnectAccount,
#[error("webhook verification failed: {0}")]
WebhookVerification(String),
#[error("stripe event already processed: {0}")]
EventAlreadyProcessed(String),
}
impl From<stripe::StripeError> for Error {
fn from(e: stripe::StripeError) -> Self {
Error::Stripe(e.to_string())
}
}