GitHub: the search for pull requests answered 422 "Validation Failed"
Pull requests across repositories come from GET /search/issues, with a query such as is:pr is:open repo:OWNER/REPO review-requested:@me. When GitHub will not run the query, it answers 422 with the message Validation Failed, and the reason is in errors[].message. The messages below are GitHub's answers on github.com, checked on October 24, 2026, with the rules from GitHub's documentation behind them.
HTTP/1.1 422 Unprocessable Entity
{"message":"Validation Failed","errors":[{"message":"The listed users and repositories cannot be searched either because the resources do not exist or you do not have permission to view them.","resource":"Search","field":"q","code":"invalid"}],"status":"422"}
422: what GitHub says, and why
The listed users and repositories cannot be searched either because the resources do not exist or you do not have permission to view them.: the query has arepo:,user:ororg:that does not exist, or that your account cannot see. Without a token, every private repository is one you cannot see. GitHub's documentation says the same: you need to authenticate and have access to the repositories in your query.The listed users cannot be searched either because the users do not exist or you do not have permission to view the users.: the query has@me(for examplereview-requested:@meorauthor:@me) and no token, so GitHub does not know who "me" is. A user name inauthor:that does not exist answers this too.The search is longer than 256 characters.: the words of the query are too long. Operators and qualifiers do not count: a query of 757 characters that was allrepo:qualifiers was answered.More than five AND / OR / NOT operators were used.- A GitHub App's user access token cannot search issues and pull requests together: GitHub's documentation says a query without
is:issueoris:pull-requestanswers 422.
Other answers
- 403 or 429 with
x-ratelimit-resource: search: the search has a limit of its own, 30 requests a minute with a token and 10 without (see which limit, and when it opens again). - 401
Bad credentials: the token was sent but GitHub does not accept it (see why). - 403 for an organization with SAML single sign-on: the token is not authorized for that organization (see how to authorize it).
- 503: GitHub's documentation lists it as service unavailable; try again later.
200, but pull requests are missing
- Several
repo:qualifiers: GitHub leaves out the repositories you cannot see, without an error. With one missing repository and one public one, the answer was 200 with the public one's pull requests. GitHub's documentation: the response contains only the resources you have access to, and does not list the ones that were not returned. incomplete_results: true: the query ran out of time, and GitHub returned the matches found before then. More may exist, or may not.- Limits: up to 100 results a page, up to 1,000 results a search, and up to 4,000 repositories searched for one query.
What to do
- A repository or owner GitHub cannot see: check the spelling, then sign in as the token's account and open it in the browser. If you see it there, the token needs access to it (see which permission to add).
@me: send a token with the query.- Too long, or too many operators: use fewer words, or split it into several searches.
- Several repositories: when one looks empty, search it on its own: a 422 then says that the token cannot see it.
GitHub pull requests in IntelliJ IDEA
Pull Request Inbox for GitHub, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, uses GitHub's search for the lists "Waiting for my review", "I am a reviewer" and "Created by me", and for the scopes "Their owner" and "Everywhere": with a repo: for each open repository, a user: for the owner, and @me for you. Without a token it lists all open pull requests, and for "Everywhere" it asks for a token instead of searching. When GitHub refuses a search, it shows GitHub's words, the reason from errors included; when the limit is reached, it says when it opens again. Each list holds up to 200 pull requests, most recently updated first. The review inbox, diffs and conversations are free; approving, commenting and merging are Pro (US$1.50 a month, with a 30-day trial).
GitHub is a trademark of GitHub, Inc.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by GitHub, Inc. or JetBrains.
More: "API rate limit exceeded" · "Resource not accessible by personal access token" · 401 "Bad credentials" · "Resource protected by organization SAML enforcement" · GitHub review refused (422) · GitHub merge refused (405, 409) · GitHub diff 406 "too_large", 3,000 files · GitHub line comment 422 "must be part of the diff" · GitHub branch update refused (422) · GitHub pull request not created (422, 403) · GitHub auto-merge refused · GitHub draft, ready for review or close refused · GitHub conversation not resolved · GitHub checks not shown (check runs 403) · GitHub file contents not read · GitHub compare refused (404, 422) · GitHub comment or reply refused (403 locked, archived) · GitHub merge method not allowed (405) · GitHub branch not found (404, 301) · GitHub Enterprise Server not reached · GitHub review request not shown · GitHub pull request list incomplete · GitHub 404 Not Found, renamed repositories (301, 307) · GitHub line comment outdated or not on the diff · GitHub pull requests not updating, notifications late · GitHub suggested change cannot be applied · GitHub required check stuck at "Expected" · GitHub code owner review required · GitHub merge blocked by unresolved conversations · GitHub merge blocked by unsigned commits · GitHub branch that merges through a merge queue · GitHub merge waiting for an approval of the most recent push · GitHub merge waiting for code scanning results · GitHub merge waiting for code quality results · GitHub merge blocked by a code coverage threshold · GitHub merge blocked by license compliance results · GitHub branch locked or its updates restricted · GitHub branch not deleted after merging · GitHub merge waiting for a team's approval (Required reviewers) · GitHub merge blocked by secret scanning alerts · GitHub stacked pull request not merging · GitHub push blocked by push rules · GitHub merge blocked by commit metadata rules · GitHub force push blocked · GitHub issue not closed by a merged pull request · GitHub pull request not checked out locally · GitHub pull request has merge conflicts · GitHub changes requested and dismissing a review · GitHub co-author not credited for a commit · GitHub dependency review check failed · GitHub Dependabot not rebasing its pull request · GitHub fork not syncing with upstream · GitHub pull request base branch not changing · GitHub pull request not reverting · GitHub pull request template not showing · GitHub pull request labels or assignees not added · GitHub pull request not closing or reopening · GitHub push blocked by push protection · GitHub pull request comment hidden · GitHub pull request blocked until deployments succeed · GitHub team review request replaced by members · GitHub pull request file no longer marked Viewed · GitHub pull request marked merged without being merged · GitHub Copilot review does not count as an approval · GitHub checks not running on a pull request a workflow created · GitHub Update branch button not shown on a pull request · GitHub checks failing on a Dependabot pull request · GitHub checks failing on a pull request from a fork · GitHub checks skipped by [skip ci] in a commit message · GitHub checks gone after the retention period · GitHub code review limits in a public repository · GitHub pull requests turned off or limited in a repository · GitHub checks run on every pull request in a stack · GitHub pull request showing commits already squash merged · GitHub pull request not showing a file diff · GitHub push to a pull request branch from a fork refused · GitHub check cancelled on a pull request · GitHub Rebase and merge not available · GitHub merge commit message not what you expected · GitHub pull request shows every line changed · GitHub API request timed out · GitHub pull request image or document diff not shown · GitHub review request refused (422) · GitHub pull request from Copilot: checks not running, approval not counted · GitHub push refused: GH006 and GH013 on a protected branch · GitHub "At least 1 approving review is required", approvals that do not count · GitHub pull request plugins for IntelliJ IDEA, compared · 日本語