-
Sean McGivern authored
This adds a custom exceptions app that replaces a magic HTML comment in an error page with some HTML displaying the request ID to the user. It also adds that magic comment to the 500 error page, where it's most useful (as we will want to look up the stack trace corresponding to that request ID for a 500 error). The reasons for making this a magic HTML comment are: 1. We don't need separate files that may drift apart from each other. An earlier version of this change added a new 500.html.erb file, which was almost identical to 500.html, just with the addition of some ERb code. If we changed one of those files, we'd need to change both. 2. If we disable this app, or it doesn't get called for some reason, the user will see no difference in the rendered output. 3. Similar to the above two reasons, these error pages in public/ are also used by Workhorse in some circumstances to replace the content sent by Rails. This is why we set the X-Gitlab-Custom-Error header when modifying the body, so that Workhorse does not then overwrite the HTML we want to send. In other words, this should be a purely additive change: if it works, great; if it doesn't, then there should be no difference.
724f4c5f