File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,8 @@ class BaseApiClient
5353 HttpStatusCode::FORBIDDEN => NotAllowed::class,
5454 HttpStatusCode::NOT_FOUND => NotFound::class,
5555 HttpStatusCode::CONFLICT => AlreadyExists::class,
56- HttpStatusCode::ENHANCE_YOUR_CALM => RateLimited::class, // RFC6585::TOO_MANY_REQUESTS
56+ HttpStatusCode::ENHANCE_YOUR_CALM => RateLimited::class,
57+ HttpStatusCode::TOO_MANY_REQUESTS => RateLimited::class,
5758 HttpStatusCode::INTERNAL_SERVER_ERROR => GeneralError::class,
5859 ];
5960
Original file line number Diff line number Diff line change @@ -90,6 +90,16 @@ class HttpStatusCode
9090 */
9191 public const ENHANCE_YOUR_CALM = 420 ;
9292
93+ /**
94+ * The 429 (Too Many Requests) status code indicates the user has sent too
95+ * many requests in a given amount of time ("rate limiting").
96+ *
97+ * @link https://datatracker.ietf.org/doc/html/rfc6585#section-4
98+ *
99+ * @var int
100+ */
101+ public const TOO_MANY_REQUESTS = 429 ;
102+
93103 /**
94104 * The 500 (Internal Server Error) status code indicates that the server
95105 * encountered an unexpected condition that prevented it from fulfilling the
You can’t perform that action at this time.
0 commit comments