pub enum PaymentsError {
NotConfigured,
SignatureInvalid(String),
Rejected(String),
Transient(String),
}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.
Trait Implementations§
Source§impl Clone for PaymentsError
impl Clone for PaymentsError
Source§fn clone(&self) -> PaymentsError
fn clone(&self) -> PaymentsError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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)>
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()
Auto Trait Implementations§
impl Freeze for PaymentsError
impl RefUnwindSafe for PaymentsError
impl Send for PaymentsError
impl Sync for PaymentsError
impl Unpin for PaymentsError
impl UnsafeUnpin for PaymentsError
impl UnwindSafe for PaymentsError
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