File tree Expand file tree Collapse file tree 3 files changed +12
-20
lines changed Expand file tree Collapse file tree 3 files changed +12
-20
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
Original file line number Diff line number Diff line change @@ -281,25 +281,6 @@ public function testFindAssetsByGeneralExpression()
281281 self ::assertValidAsset ($ result ['resources ' ][0 ]);
282282 }
283283
284- /**
285- * Find assets without limiting expression to certain fields but with an underscore in the expression
286- * Shows results containing the entire expression in any string field
287- * Shows results containing the entire expression or a part of it (parts are separated by underscore) in public_id
288- *
289- * @throws ApiError
290- */
291- public function testFindAssetsByGeneralExpressionWithUnderscore ()
292- {
293- $ result = $ this ->search
294- ->expression (self ::$ MULTI_STRING )
295- ->maxResults (2 )
296- ->execute ();
297-
298- self ::assertEquals (2 , $ result ['total_count ' ]);
299- self ::assertCount (2 , $ result ['resources ' ]);
300- self ::assertValidAsset ($ result ['resources ' ][0 ]);
301- }
302-
303284 /**
304285 * Find assets with an expression limiting the search expression to certain fields
305286 * Shows results containing given text in tags field
You can’t perform that action at this time.
0 commit comments