Improve 404 returned when linking to a deleted directory

Problem to solve

  • I gave a link like this one: https://framagit.org/myuser/myrepo/tree/master/mydirectory.
  • It worked first but then I deleted mydirectory.
  • After the deletion, the link now returns a 404 with no details (just a big scary page).

Proposal

I would be nice for the 404 to contains details on the repository.

What does success look like, and how can we measure that?

A new 404 with a link to the repository/project root.

Less people getting lost with a 404 link, we can measure it by looking at how many people click on the repo link when they are showed the 404 page.

Edited by 🤖 GitLab Bot 🤖