Skip to content

Commit

Permalink
VcsRepository: do not continue when receiving 429 rate limit exception (
Browse files Browse the repository at this point in the history
  • Loading branch information
glaubinix committed Oct 2, 2021
1 parent 90d112d commit edccad4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Composer/Repository/VcsRepository.php
Expand Up @@ -282,7 +282,7 @@ protected function initialize()
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;
}
}
Expand Down Expand Up @@ -371,7 +371,7 @@ protected function initialize()
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) {
Expand Down

0 comments on commit edccad4

Please sign in to comment.