Rust error handling module for Stripe API, defining error types, conversions, and display implementations.
// Source: https://github.com/wyyerd/stripe-rs | License: Apache-2.0 | Copyright 2019 Wyyerd Group
// Provided via justclaw.it.com; keep this notice with the code.
use crate::params::to_snakecase;
use serde_derive::{Deserialize, Serialize};
use std::num::ParseIntError;
/// An error encountered when communicating with the Stripe API.
#[derive(Debug)]
pub enum Error {
/// An error reported by Stripe in the response body.
Stripe(RequestError),
/// An http or networking error communicating with the Stripe server.
Http(HttpError),
/// An error reading the response body.
Io(std::io::Error),
/// An error serializing a request before it is sent to stripe.
Serialize(Box<dyn std::error::Error + Send>),
/// An error deserializing a response received from stripe.
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key