def HandleEndpointsError(self, user_error):
    """Handle an error state returned by IsEndpointsConfigUpdated.

    Args:
      user_error: Either None or a string with a message from the server
        that indicates what the error was and how the user should resolve it.

    Raises:
      RuntimeError: The update state is fatal and the user hasn't chosen
        to ignore Endpoints errors.
    """
    detailed_error = user_error or (
        "Check the app's AppEngine logs for errors: %s" % self.GetLogUrl())
    error_message = ('Failed to update Endpoints configuration.  %s' %
                     detailed_error)
    StatusUpdate(error_message, self.error_fh)


    doc_link = ('https://developers.google.com/appengine/docs/python/'
                'endpoints/test_deploy#troubleshooting_a_deployment_failure')
    StatusUpdate('See the deployment troubleshooting documentation for more '
                 'information: %s' % doc_link, self.error_fh)

    if self.ignore_endpoints_failures:
      StatusUpdate('Ignoring Endpoints failure and proceeding with update.',
                   self.error_fh)
    else:
      raise RuntimeError(error_message)
dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/tools/appcfg.py/AppVersionUpload.HandleEndpointsError/original