def _ParseOperation(self, operation, title):
    if 'error' in operation and 'errors' in operation['error']:
      for e in operation['error']['errors']:
        logging.error('%s: %s: %s',
                      title, e.get('code', 'NO ERROR CODE'),
                      e.get('message', 'NO ERROR MESSAGE'))
      return False

    if 'warnings' in operation:
      for w in operation['warnings']:
        logging.warning('%s: %s: %s',
                        title, w.get('code', 'NO WARNING CODE'),
                        w.get('message', 'NO WARNING MESSAGE'))
    return True
Parses operation result and log warnings and errors if any.
dataset/ETHPy150Open GoogleCloudPlatform/Solutions-Using-ETL-tool-on-Google-Compute-Engine/gce_api.py/GceApi._ParseOperation