WooRateLimitException class

The store is refusing requests because too many arrived too quickly.

WooCommerce can rate limit the Store API, and hosts often rate limit the whole REST API. Distinct from WooServerException because the fix is to wait exactly retryAfter and try again, not to give up.

Inheritance

Constructors

WooRateLimitException(String message, {String? code, int? statusCode, Duration? retryAfter, int? limit, int? remaining})
Creates the exception.
const

Properties

code String?
WooCommerce's own error code, such as woocommerce_rest_invalid_id.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
limit int?
Requests allowed per window, when the store said.
final
message String
What went wrong, in words. Comes from WooCommerce where it said something useful, and from this client where it did not.
finalinherited
remaining int?
Requests left in this window, when the store said.
final
retryAfter Duration?
How long to wait, when the store said. Comes from RateLimit-Retry-After or the standard Retry-After header.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statusCode int?
The HTTP status, when there was one.
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited