This was previously broken by 59ef48c0b9 (#11425, #11424). Centralize the logic into the exception controller, which avoids the problematic bug and makes it easy to add additional detailed 404 pages in the future.
59ef48c0b9
discourse_dev
db_id