Enum square_api_client::models::enums::ErrorCategory
source · [−]pub enum ErrorCategory {
ApiError,
AuthenticationError,
InvalidRequestError,
RateLimitError,
PaymentMethodError,
RefundError,
MerchantSubscriptionError,
}
Expand description
Indicates which high-level category of error has occurred during a request to the Connect API.
Variants
ApiError
An error occurred with the Connect API itself.
AuthenticationError
An authentication error occurred. Most commonly, the request had a missing, malformed, or
otherwise invalid Authorization
header.
InvalidRequestError
The request was invalid. Most commonly, a required parameter was missing, or a provided parameter had an invalid value.
RateLimitError
Your application reached the Square API rate limit. You might receive this error if your application sends a high number of requests to Square APIs in a short period of time.
Your application should monitor responses for 429 RATE_LIMITED
errors and use a retry
mechanism with an exponential backoff
schedule to resend the requests at an increasingly slower rate. It is also a good practice
to use a randomized delay (jitter) in your retry schedule.
PaymentMethodError
An error occurred while processing a payment method. Most commonly, the details of the payment method were invalid (such as a card’s CVV or expiration date).
RefundError
An error occurred while attempting to process a refund.
MerchantSubscriptionError
An error occurred when checking a merchant subscription status
Trait Implementations
sourceimpl Clone for ErrorCategory
impl Clone for ErrorCategory
sourcefn clone(&self) -> ErrorCategory
fn clone(&self) -> ErrorCategory
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for ErrorCategory
impl Debug for ErrorCategory
sourceimpl<'de> Deserialize<'de> for ErrorCategory
impl<'de> Deserialize<'de> for ErrorCategory
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
sourceimpl PartialEq<ErrorCategory> for ErrorCategory
impl PartialEq<ErrorCategory> for ErrorCategory
sourcefn eq(&self, other: &ErrorCategory) -> bool
fn eq(&self, other: &ErrorCategory) -> bool
sourceimpl Serialize for ErrorCategory
impl Serialize for ErrorCategory
impl Eq for ErrorCategory
impl StructuralEq for ErrorCategory
impl StructuralPartialEq for ErrorCategory
Auto Trait Implementations
impl RefUnwindSafe for ErrorCategory
impl Send for ErrorCategory
impl Sync for ErrorCategory
impl Unpin for ErrorCategory
impl UnwindSafe for ErrorCategory
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.