pub enum CommerceIntentError {
InvalidField {
field: &'static str,
reason: String,
},
Serialization(Error),
Canonicalization(String),
AmountExceedsLimit {
amount: u64,
max_total: u64,
},
IntentExpired {
executed_at: u64,
expires_at: u64,
},
CurrencyMismatch {
expected: String,
actual: String,
},
MerchantMismatch {
expected: String,
actual: String,
},
PayeeMismatch {
expected: String,
actual: String,
},
ShippingCountryMismatch {
expected: String,
actual: String,
},
UnauthorizedSku {
sku: String,
},
UnauthorizedCategory {
category: String,
},
}Expand description
Errors that can occur when handling commerce intents and receipts.
Variants§
InvalidField
A field failed validation.
Serialization(Error)
JSON serialization failed.
Canonicalization(String)
Canonicalization failed.
AmountExceedsLimit
The execution exceeded the authorized amount.
IntentExpired
The execution happened after the intent expired.
CurrencyMismatch
The execution currency does not match the intent currency.
MerchantMismatch
The execution merchant does not match the authorized merchant.
PayeeMismatch
The execution payee does not match the authorized payee.
ShippingCountryMismatch
The execution shipping country does not match the authorized country.
An executed SKU is outside the authorized scope.
Fields
An executed category is outside the authorized scope.
Fields
Trait Implementations§
Source§impl Debug for CommerceIntentError
impl Debug for CommerceIntentError
Source§impl Display for CommerceIntentError
impl Display for CommerceIntentError
Source§impl Error for CommerceIntentError
impl Error for CommerceIntentError
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 CommerceIntentError
impl !RefUnwindSafe for CommerceIntentError
impl Send for CommerceIntentError
impl Sync for CommerceIntentError
impl Unpin for CommerceIntentError
impl UnsafeUnpin for CommerceIntentError
impl !UnwindSafe for CommerceIntentError
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