GitLab: the list of merge requests answered 400 or 404
Merge requests come from three lists in GitLab's REST API: a project's (GET /projects/:id/merge_requests), a group's with its subgroups (GET /groups/:id/merge_requests), and every merge request you can see on the instance (GET /merge_requests). When GitLab refuses the query, a parameter it cannot use answers 400 with the reason in error, and a group it cannot find answers 404. The answers below are what gitlab.com said on October 25, 2026, with the rules from GitLab's documentation behind them.
HTTP/1.1 400 Bad Request
{"error":"reviewer_id, reviewer_username are mutually exclusive"}
400: what GitLab says, and why
scope does not have a valid value:scopeis not one ofcreated_by_me,assigned_to_me,reviews_for_meorall.state does not have a valid value:stateis not one ofopened,closed,locked,mergedorall.order_by does not have a valid valueis the same fororder_by(for examplecreated_atorupdated_at).reviewer_id, reviewer_username are mutually exclusive, and the same forauthor_id, author_username: a user is named by number or by username, not both.reviewer_id should be an integer, none, or any, however got …:reviewer_idtakes a user's number,None(no reviewer) orAny(any reviewer). A username goes inreviewer_username.
401 and 404
- 401
401 UnauthorizedfromGET /merge_requests: this list returns only the merge requests you created unlessscope=allis given, so without a token GitLab does not know who you are. Withscope=alland no token, gitlab.com answered with the merge requests of public projects. - 404
404 Group Not FoundfromGET /groups/:id/merge_requests: the group does not exist, or your token cannot see it, or the path is not a group at all: a user's personal namespace has no group list. GitLab's API also does not follow a group's old path, unlike a project's, so after the group was renamed, a clone made before then names a group that answers 404 (see GitLab 404 "Group Not Found"). - 404
404 Project Not Foundfrom a project's list: the project is missing, or your token cannot see it (see address or access).
200, but merge requests are missing
GET /merge_requestswithoutscope: only the merge requests you created; the default iscreated_by_me.- A group's list leaves out archived projects: its
non_archivedis true unless you sendfalse. On the instance-wide list it is false. - Without a token, only public projects' merge requests are listed.
- Pages: up to 100 merge requests a page (
per_page). When more than 10,000 match, GitLab leaves outx-totalandx-total-pages: on gitlab.com, the instance-wide list of open merge requests came without them; followx-next-pageinstead.
What to do
- 400: send the values as GitLab's documentation lists them, and only one of
reviewer_idandreviewer_username(or of the twoauthorparameters). - 401: send a token, or ask for
scope=all. - 404 for a group: open the project's page on GitLab. If its address shows another group now, the group was renamed or the project moved: list that group, and point the clone at the new address with
git remote set-url. For a personal namespace, list the project's merge requests instead.
In IntelliJ IDEA: "Failed to load merge requests.", "The authorization token was revoked" and "… but merge request details loading failed"
The GitLab support built into IntelliJ IDEA turns these refusals into lines of its own. In the source (checked October 30, 2026; IntelliJ IDEA: GitLabMergeRequestErrorUtil.kt, GitLabHttpStatusError.kt, GitLabFiltersPanelFactory.kt, GitLabMergeRequestOnCurrentBranchService.kt, GitLabMergeRequestEditorReviewViewModel.kt, GitLabMergeRequestChanges.kt):
- "Failed to load merge requests." heads the list when loading it fails, with one line under it that depends on the error.
- "The authorization token was revoked", with an action to log in again, when GitLab's answer has
"error": "invalid_token". GitLab sends that for an expired token as well as a revoked one (GitLab 401 "invalid_token"), so the line says revoked even when the token has only expired. Either way, a new token is the fix. - "HTTP request error" and the value of
errorfor any other answer with anerrorfield, for exampleinsufficient_scope(which scope to add). - "Connection error occurred" when the server cannot be reached; for other failures, the error's own message.
- "Failed to load data" with Retry loading data in the list of people a filter offers, when those users cannot be loaded.
- On a branch that has a merge request, the branch name reads "!42 on feature", and its description reads "Merge request !42 exists for current branch feature". It goes on "…, but local branch is out of sync with remote" when the merge request has commits your local branch does not have yet, and "…, but merge request details loading failed" when loading the merge request's changes failed. IntelliJ IDEA loads them commit by commit, each commit and its diff through the REST API (
/repository/commits/:shaand/repository/commits/:sha/diff, five at a time), so any refused or failed request among them ends there; so does a merge request that GitLab returns withoutdiffRefs.
GitLab merge requests in IntelliJ IDEA
Merge Request Inbox for GitLab, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, lists open merge requests from these three: the project's list for "Open projects", the group's list for "Their group", and the instance-wide list with scope=all for "Everywhere", with reviewer_id or author_id for the lists "Waiting for my review", "I am a reviewer" and "Created by me". Without a token it lists all open merge requests of public projects, with the filters by you turned off, and for "Everywhere" it asks for a token instead. When the group answers 404, as a personal namespace does, it lists the project's own merge requests. From version 1.0.16, when the group was renamed or the project moved to another group since the clone, "Their group" lists that group under its new path; before, it listed only the project's own merge requests. Each list holds up to 200 merge requests, most recently updated first. Reading is free; approving, commenting and merging are Pro (US$1.50 a month, with a 30-day trial).
GITLAB is a trademark of GitLab Inc.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by GitLab Inc. or JetBrains.
More: GitLab 404 "Project Not Found" · GitLab 404 "Group Not Found" · GitLab 401 "invalid_token" · GitLab "insufficient_scope" · GitLab merge refused (405, 409, 422) · GitLab approval refused (401, 409) · GitLab comment or thread refused (400, 403) · GitLab merge request not created (409, 422, 400) · GitLab rebase refused or failed (403, 409) · GitLab auto-merge refused (405) or canceled · GitLab merge request changes cut short ("1000+", too_large) · GitLab 429 "Retry later" (rate limits) · GitLab "compare_timeout": true (diff limits) · GitLab merge request plugins for IntelliJ IDEA, compared · 日本語