private function responseFrom(ControllerContextInterface $context)
    {
        $response = $context->response();
        if (! $response instanceof ResponseInterface) {
            throw new MissingResponseException(
                "Missing response object after handle the request. If you disabled rendering you need to ".
                "provide an HTTP response object to be returned to the client. Use Context::setResponse() ".
                "to provide a response to be returned."
            );
        }

        return $response;
    }