Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #959 ExceptionThrower: adjust rate limit detection (glaubinix)
This PR was merged into the 2.x branch. Discussion ---------- GitHub returns 0 values for API limit headers on GraphQL endpoints in cases where no authentication is provided or the authentication is invalid. Running the following code currently triggers an `ApiLimitExceedException` because of that. Even though the GitHub API returns a 401 status code with the message `This endpoint requires you to be authenticated.` ``` <?php require 'vendor/autoload.php'; $client = new \Github\Client(); $client->graphql()->execute('query { viewer { organizations(last: 100) { nodes { name } } } }'); ``` Commits ------- 1a650c1 ExceptionThrower: adjust rate limit detection
- Loading branch information