code: def handleEndHeaders(self):
          
  
          if self.status != '200':
  
              if not hasattr(self, 'cimerror') or \
                 not hasattr(self, 'errordetail'):
  
                  self.factory.deferred.errback(
                      CIMError(0, 'HTTP error %s: %s' %
                               (self.status, self.message)))
  
              else:
  
                  self.factory.deferred.errback(
                      CIMError(0, '%s: %s' % (cimerror, errordetail)))
docs: Check whether the status was OK and raise an error if not
          using previously saved header information.