Make RepoPath group wiki compatible
Description
In !30279 (merged) we attempted to make RepoPath
compatible with group wiki. This was reverted later because one issue was found on sentry.
The incident seems to only affect one user, meaning it is a rather rare edge case. It seems the user passed group path as a repository path, which means in the past it would return a 4xx error, but after the change it would surface as a 5xx error.
We want to re-apply !30279 (merged), but make it raise 4xx error for the edge case instead.
Proposed solution
The simplest solution would be to raise RecordNotFound
error when
-
Gitlab::GlRepository::PROJECT
is selected inGitlab::RepoPath::parse
- AND when provided path is a group
This feels like a tech-debt tbough, and there may be a better solution.