VcsRepository: do not continue when receiving 429 rate limit exception (#10132)

main
Stephan 3 years ago committed by GitHub
parent 90d112d98a
commit edccad4e05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -282,7 +282,7 @@ class VcsRepository extends ArrayRepository implements ConfigurableRepositoryInt
if ($e->getCode() === 404) {
$this->emptyReferences[] = $identifier;
}
if ($e->getCode() === 401 || $e->getCode() === 403) {
if (in_array($e->getCode(), array(401, 403, 429), true)) {
throw $e;
}
}
@ -371,7 +371,7 @@ class VcsRepository extends ArrayRepository implements ConfigurableRepositoryInt
if ($e->getCode() === 404) {
$this->emptyReferences[] = $identifier;
}
if ($e->getCode() === 401 || $e->getCode() === 403) {
if (in_array($e->getCode(), array(401, 403, 429), true)) {
throw $e;
}
if ($isVeryVerbose) {

Loading…
Cancel
Save