Skip to content

Commit 92203a6

Browse files
committed
Merge pull request #87 from kasperg/patch-1
Do not report validation errors as rate limits
2 parents 782b02d + 9f65965 commit 92203a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Github/HttpClient/Listener/ErrorListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function onRequestError(Event $event)
4141
if ($response->isClientError() || $response->isServerError()) {
4242
$remaining = (string) $response->getHeader('X-RateLimit-Remaining');
4343

44-
if (null !== $remaining && 1 > $remaining && 'rate_limit' !== substr($request->getResource(), 1, 10)) {
44+
if (null != $remaining && 1 > $remaining && 'rate_limit' !== substr($request->getResource(), 1, 10)) {
4545
throw new ApiLimitExceedException($this->options['api_limit']);
4646
}
4747

0 commit comments

Comments
 (0)