code: def request(self, *args, **kwargs):
          
          r = self.session.request(*args, **kwargs)
          if r.status_code != requests.codes.ok:
              error = ET.fromstring(r.content)
              message = error.findtext('message')
              code = error.attrib['key']
              raise CleanwebError('%s (%s)' % (message, code))
          return r
docs: Error handling in requests
              http://api.yandex.ru/cleanweb/doc/dg/concepts/error-codes.xml