private function setErrorView($response)
    {
        if (Response::isServerError($response) && $this->logger) {
            $this->logger->error('received a server error response: ' . $response->getStatusCode());
        }
        $stream   = $this->error->getStream($response->getStatusCode(), $response->getData());
        $response = $response->withBody($stream);
        return $response;
    }
private function setErrorView($response)
    {
        if (Response::isServerError($response) && $this->logger) {
            $this->logger->error('received a server error response: ' . $response->getStatusCode());
        }
        $stream   = $this->error->getStream($response->getStatusCode(), $response->getData());
        $response = $response->withBody($stream);
        return $response;
    }
private function setErrorView ( $ response ) { if ( Response :: isServerError ( $ response ) && $ this -> logger ) { $ this -> logger -> error ( 'received a server error response: ' . $ response -> getStatusCode ( ) ) ; } $ stream = $ this -> error -> getStream ( $ response -> getStatusCode ( ) , $ response -> getData ( ) ) ; $ response = $ response -> withBody ( $ stream ) ; return $ response ; }
render error pages.

@param Response $response
@return Response
render error pages .