Error 500 on fetching https://gitlab.com/api/v4/projects?owned=true with OAuth token granted under `api` scope

What is the current bug behavior?

This is what I get ({'message': '500 Internal Server Error'}, 500)

What is the expected correct behavior?

It should provide the user with a list of owned projects according to the API.

Relevant logs and/or screenshots

https://sentry.gitlap.com/gitlab/gitlabcom/issues/27228/events/2003243/

Output of checks

This bug happens on https://gitlab.com/api/v4/projects?owned=true with OAuth token granted under api scope

Edited by Toon Claes