Skip to content

Commit 3aa2d6f

Browse files
committed
Merge pull request #65 from leonardaustin/master
ApiLimitExceedException removed on rate_limit resource
2 parents 9c64e60 + 1413f07 commit 3aa2d6f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Github/HttpClient/Listener/ErrorListener.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ public function postSend(RequestInterface $request, MessageInterface $response)
4343
/** @var $response \Github\HttpClient\Message\Response */
4444
if ($response->isClientError() || $response->isServerError()) {
4545
$remaining = $response->getHeader('X-RateLimit-Remaining');
46-
if (null !== $remaining && 1 > $remaining) {
46+
47+
if (null !== $remaining && 1 > $remaining && 'rate_limit' !== substr($request->getResource(), 1, 10)) {
4748
throw new ApiLimitExceedException($this->options['api_limit']);
4849
}
4950

0 commit comments

Comments
 (0)