public function __invoke(\Throwable $exception) : Response { $exception = $this->errorRenderer ->render($exception); return new Response($exception->getAsString(), $exception->getStatusCode(), $exception->getHeaders()); }