code: def _state_error(self, reason):
          
          log.err(reason)
  
          def matchException(failure):
              for errorState, backOff in self.backOffs.iteritems():
                  if 'errorTypes' not in backOff:
                      continue
                  if failure.check(*backOff['errorTypes']):
                      return errorState
  
              return 'other'
  
          errorState = matchException(reason)
          self._reconnect(errorState)
docs: The connection attempt resulted in an error.
  
          Attempt a reconnect with a back-off algorithm.