pub enum PaymentsError {
NotConfigured,
SignatureInvalid(String),
Rejected(String),
Transient(String),
Unsupported(&'static str),
}Expand description
Payment failures. NotConfigured lets a venture build and run without
Stripe (the port reports it rather than erroring); the rest map an upstream
failure. SignatureInvalid is separated so a webhook handler answers 400
and never processes an unverified event.
Variants§
NotConfigured
No Stripe key configured: the caller should degrade, not fail.
SignatureInvalid(String)
A webhook signature or timestamp did not verify: reject the request, do not process the event.
Rejected(String)
Stripe rejected the request (a 4xx that is not auth): not retryable
without a change.
Transient(String)
A transient failure (a 5xx, a transport error): retry later.
Unsupported(&'static str)
This adapter does not implement the operation — e.g. usage reporting on an adapter that does not do metered billing. Not retryable: a caller that needs it must select an adapter that supports it.
Trait Implementations§
Source§impl Clone for PaymentsError
impl Clone for PaymentsError
Source§impl Debug for PaymentsError
impl Debug for PaymentsError
Source§impl Display for PaymentsError
impl Display for PaymentsError
Source§impl Error for PaymentsError
impl Error for PaymentsError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()