Could not update wiki page: Empty error message when using hierarchical link

Summary

An empty error message is raised when updating a project wiki which contains links to sub wikis.

Steps to reproduce

  1. Create a main wiki page "Main Wiki"

  2. Create a sub wiki "YYYYMMDD" under the "Main Wiki" by clicking on the + icon.

  3. Update the main wiki page "Main Wiki" and add a link to the new subwiki in this format.

    [20230718](Weekly-Digest/20230718)
  4. Get the following error message.

    Could not update wiki page
    The form contains the following error:
    *
  5. Observe that the changes are saved regardless.

Example Project

As of writing this does not occur in GitLab.com 16.2.0-pre c80af298068

What is the current bug behavior?

  1. An empty error message is raised.

    Could not update wiki page
    The form contains the following error:
    *

What is the expected correct behavior?

  1. No error message should be raised.

Relevant logs and/or screenshots

Screenshot_from_2023-07-18_14-24-51

Output of checks

Results of GitLab environment info

This happens on Gitlab SM 15.X.

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes