Bug: An anonymous REST API call to api/v4/projects?search=… with the param per_page leads to "500 Internal Server Error"`

Good evening

It's a pity that the GitLab REST API is still in early beta... at least, it feels like this, because I've only been testing it for 2 days and I keep stumbling across very basic bugs and this time, the REST API even fails with common parameters 😥

The problem in this issue relates to this REST API function: https://docs.gitlab.com/ee/api/projects.html#search-for-projects-by-name

To reproduce the bug, the following is important:

  1. the browser which calls the GitLab REST API must not be logged into GitLab

  2. Use the api/v4/projects?search API and add the per_page param and set it to 2. Try this:

    https://gitlab.com/api/v4/projects?search=jig-opensource%2fsource-code&per_page=2

  3. then you get: "message": "500 Internal Server Error"

Important:

  • if &per_page=2, we get 500 Internal Server Error
  • if &per_page=20, we get 200 OK
  • if &per_page=100, we get 200 OK

Thanks a lot, kind regards, Thomas

Edited Jul 29, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading