Backport: Added routes and action to test error pages with.
(cherry picked from commit f2f3d18)