public function createResponse(ViewHandler $handler, View $view, Request $request)
    {
        try {
            $content = $this->createFeed($view->getData());
            $code = Response::HTTP_OK;
        } catch (\Exception $e) {
            if ($this->logger) {
                $this->logger->error($e);
            }

            $content = sprintf('%s:<br/><pre>%s</pre>', $e->getMessage(), $e->getTraceAsString());
            $code = Response::HTTP_BAD_REQUEST;
        }

        return new Response($content, $code, $view->getHeaders());
    }