Error template duplicates
Original discussion
Problem
GitLab uses templates to render error pages. Currently we have two places where they are stored:
-
public/*
(for static templates) -
app/views/errors/*
(for dynamic templates)
That leads to a duplication of templates. We have to maintain two versions of them.
Proposal
- Investigate why we do need
public/*
templates - Consider migrating to
app/views/errors
templates as a SSOT
Investigation
Looks like these static templates are used by NGINX. I found an old MR that introduced them: omnibus-gitlab!962 (diffs). When error code is 404, 500 or 502 the response from Rails app is replaced with a static page.
Edited by Vasilii Iakliushin