The GitHub Pull Requests extension is making too many requsts to GitHub
I uncollapsed hundreds of PRs in the VS Code repo and clicked multiple times on "refresh".
Testing #4646

This is a known issue if you click on "refresh" multiple times. I'll need to separate the model from the vscode.TreeView in order to prevent multiple refreshes from running at the same time.
I attempted the same, the error I see is slightly different.
I was wondering if I should see the same notification as @hediet ?
Update: I tested again, and it showed the same notification as above
@aiday-mar it's a race to see which notification you'll see first. One comes from the extension's internal rate limit and one comes from github.
if i take any action with the PR extension (checkout issue branch, sync remote PRs, open new PR, etc) i receive two "network error 403" -- what's causing this?
i've tried
- reinstalling extension
- using pre-release version
- logging out/back in to github in vscode
@kltdwrds a 403 could be caused by several things. Could you open a new issue and include output from GitHub Pull Request?
Apologies if this isn't the correct place to post this, but my extension seems to be persistently in this state at the moment. I'm assuming (although I have no idea), that each of these notifications is popping up with a new request, but I haven't pressed “refresh”, this happens if I leave the panel open for any period - I'm guessing it's auto-refreshing in the background or something?
https://github.com/microsoft/vscode-pull-request-github/assets/813980/4b8bf9ab-69a0-43b9-8ca0-67710c73ad2a
Any workarounds would be useful. Thanks!
@maxshelley could you set the default log level for GitHub Pull Request to "Debug" (command: Developer: Set Log Level... then choose "GitHub Pull Request" then use the double-checkmark icon next to "Debug"). Please do this before encountering any issue! Then, when you see the issue, can you share the output from GitHub Pull Request?
@alexr00 Thanks for responding so quickly - this issue seemed to go away before I got a chance to do this, but I'll bookmark this and ensure I follow these steps if it reoccurs. Thanks again!
I'm consistently hitting my graphql rate limit with my current usage of this extension. I have a PR open with a lot of comments (~300) and files (~250). After about half an hour of usage the comments tab goes blank. If I hit refresh I get a rate limit error.
gh api /rate_limit | jq '.resources.graphql'
{
"limit": 50000,
"used": 0,
"remaining": 50000,
"reset": 1739902395
}
Not exactly the same as the OP's error message, but seems similar enough. Thanks for the useful extension!
hi @alexr00 I also constantly faced this issue, here is the log after I changed the log level to "debug". I am not using Github enteerprise
2025-05-07 11:08:37.313 [debug] PRNode> Fetch children of PRNode #1328
2025-05-07 11:08:37.315 [debug] PullRequestModel> Fetch file changes, base, head and merge base of PR #1328 - enter
2025-05-07 11:08:37.315 [debug] RateLimit> Extension rate limit remaining: 140, PullRequestFiles
2025-05-07 11:08:37.315 [debug] IssueModel> Fetch viewers latest review commit
2025-05-07 11:08:37.315 [debug] RateLimit> Extension rate limit remaining: 139, LatestReviewCommit
2025-05-07 11:08:37.317 [debug] RateLimit> Extension rate limit remaining: 138, GetPendingReviewId
2025-05-07 11:08:38.006 [error] GitHubRepository+0> Error querying GraphQL API: GraphQL error: API rate limit exceeded for user ID 1896814..
2025-05-07 11:08:38.007 [debug] RateLimit> Extension rate limit remaining: 138, /repos/{owner}/{repo}/compare/{base}...{head}
2025-05-07 11:08:38.013 [error] GitHubRepository+0> Error querying GraphQL API: GraphQL error: API rate limit exceeded for user ID 1896814..
2025-05-07 11:08:38.014 [error] GraphQL error: API rate limit exceeded for user ID 1896814.
2025-05-07 11:08:38.038 [error] GitHubRepository+0> Error querying GraphQL API: GraphQL error: API rate limit exceeded for user ID 1896814..
2025-05-07 11:08:39.316 [debug] PullRequestModel> More than 100 files changed, fetching all file changes of PR #1328
2025-05-07 11:08:39.317 [warning] RateLimit> REST Rate limit remaining: 329, cost: -1, /repos/{owner}/{repo}/compare/{base}...{head}
2025-05-07 11:08:41.408 [debug] PullRequestModel> Fetch file changes and merge base of PR #1328 - done, total files 106
It can refresh the list of PRs, but it can't expand any PR. Thank for checking.
@longnd, next time you see the issue can you send the whole GitHub Pull Request log? Whatever was causing it happened before the log snippet you shared.