protected function routeToErrorPage(ServerRequestInterface $request, ResponseInterface $response)
    {
        $errorRoute = $this->getErrorRoute($request, $response);
        
        if (!isset($errorRoute)) {
            return $response;
        }
        
        $runner = $this->router->getRunner();
        
        return $runner($request->withAttribute('route', $errorRoute), $response);
    }