pub enum GateError {
PaymentHeaderMissing,
InvalidPaymentHeader,
NoPaymentMatching,
VerificationFailed {
reason: ErrorReason,
message: String,
},
Settlement(Box<SettleResponse>),
SettlementAborted(String),
PaymentRequiredBuild(String),
IncompatibleSettlementMode {
mode: SettlementMode,
flow: PaymentFlowName,
},
MissingScheme {
scheme: CompactString,
network: ChainId,
},
MissingSettleOnCancel {
scheme: CompactString,
},
FacilitatorSupport(FacilitatorSupportError),
Transport {
kind: FacilitatorTransportKind,
},
}server only.Expand description
HTTP payment-gate failure.
Variants§
PaymentHeaderMissing
Payment-Signature is absent.
InvalidPaymentHeader
Payment-Signature is present but not valid base64 JSON.
NoPaymentMatching
No accept matches the payload.
VerificationFailed
Facilitator rejected the payment (isValid: false or verify error).
Fields
reason: ErrorReasonWire reason used for 402 vs 412.
Settlement(Box<SettleResponse>)
Structured settle failure. Emitted as 402 + Payment-Response.
SettlementAborted(String)
Settle never produced a structured body.
PaymentRequiredBuild(String)
402 body construction failed.
IncompatibleSettlementMode
Concurrent/Background used with upfront or escrow.
Fields
mode: SettlementModeConfigured HTTP settlement mode.
flow: PaymentFlowNameOffending payment flow.
MissingScheme
No scheme registered for this accept.
MissingSettleOnCancel
Escrow accept whose scheme does not implement settle_on_cancel.
Fields
scheme: CompactStringWire scheme name.
FacilitatorSupport(FacilitatorSupportError)
Facilitator /supported kind missing or extra unusable. HTTP 500.
Transport
Facilitator transport failure. HTTP 502.
Fields
kind: FacilitatorTransportKindTransport failure kind.
Trait Implementations§
Source§impl Error for GateError
impl Error for GateError
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()
Source§impl From<FacilitatorSupportError> for GateError
impl From<FacilitatorSupportError> for GateError
Source§fn from(source: FacilitatorSupportError) -> Self
fn from(source: FacilitatorSupportError) -> Self
Auto Trait Implementations§
impl Freeze for GateError
impl RefUnwindSafe for GateError
impl Send for GateError
impl Sync for GateError
impl Unpin for GateError
impl UnsafeUnpin for GateError
impl UnwindSafe for GateError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read moreSource§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.