Merge request close fails with unhelpful error when reviewers exceed limit
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
When attempting to close a merge request with more than 200 reviewers, the UI displays a generic error message Something went wrong. Please try again. while the actual error total must be less than or equal to 200 is only visible in server logs. Additionally, the reviewer list in the UI only displays 100 reviewers without indicating that more reviewers exist.
Steps to reproduce
- Create a merge request with more than 200 reviewers (or add reviewers via API to exceed the limit)
- Attempt to close the merge request via the UI
- Observe the error message
Current behavior
- UI Error: Generic "Something went wrong. Please try again." message
-
Actual Error: Only visible in logs:
total must be less than or equal to 200 - Reviewer Display: UI shows only 100 reviewers with no indication that more exist (actual count: 400+)
Expected behavior
- Error Message: The UI should display the actual error: "Cannot close merge request: Total reviewers (400) exceeds the maximum allowed (200). Please remove some reviewers and try again."
- Reviewer Count: The UI should clearly show the total count of reviewers (e.g., "400 reviewers") even if only displaying the first 100, with a link to view all or a pagination control.
Possible fixes
- Surface the real error: Catch the validation error in the API response and display it to the user instead of a generic error message
- Display reviewer count: Add a counter showing total reviewers vs. displayed reviewers (e.g., "Showing 100 of 400 reviewers")
- Consider the limit: Either increase the 200 reviewer limit or provide a better UX for managing large reviewer lists
Environment
- GitLab.com or Self-Managed (specify if known)
- Merge request with 400+ reviewers
Related issues
- #381311 (closed) - Error 500 when closing merge request (similar error surfacing issue)
Edited by 🤖 GitLab Bot 🤖