docs: def _check_response_for_errors(self, response):
          """Checks the response for errors and raises one if any exists."""
  
          try:
              doc = minidom.parseString(_string(response).replace("opensearch:", ""))
          except Exception as e:
              raise MalformedResponseError(self.network, e)
  
          e = doc.getElementsByTagName("lfm")[0]
          # logger.debug(doc.toprettyxml())
  
          if e.getAttribute("status") != "ok":
              e = doc.getElementsByTagName("error")[0]
              status = e.getAttribute("code")
              details = e.firstChild.data.strip()
              raise WSError(self.network, status, details)