In previous versions of Moodle we recommended use of the fallback
resource with /error/index.php.
This is incompatible with the routing system because they use the same
mechanism for responding to any unknown request.
To better handle this we need to move the current error handler page to
a routed page, and to provide a shim for the old location.
At the same time we need to improve the Slim Error handling middleware
to respond with our 404 handler for all 404s, except for those on API
routes where we always respond with JSON.
This is the beginning of the end for non-routed pages in Moodle and the
start of SEO-friendly page URLs.
A 'shim' is provided for backwards compatibility.