code: def parse_response(resp):
      
      host_id, msg, code = None, None, None
      try:
          content = resp.content
          root = ET.fromstring(content)
          code = root.find('./Code').text
          msg = root.find('./Message').text
          request_id = root.find('./RequestId').text
          host_id = root.find('./HostId').text
      except ETParseError:
          request_id = resp.headers.get('x-odps-request-id', None)
          if len(resp.content) > 0:
              obj = json.loads(resp.text)
              msg = obj['Message']
              code = obj.get('Code')
              host_id = obj.get('HostId')
              if request_id is None:
                  request_id = obj.get('RequestId')
          else:
              return
      clz = globals().get(code, ODPSError)
      return clz(msg, request_id=request_id, code=code, host_id=host_id)
docs: Parses the content of response and returns an exception object.