private EtcdKeysResponse handleEtcdWatchErrors(EtcdException exception){
  if (exception.errorCode == ETCD_EVENT_INDEX_CLEARED_CODE) {
    initialSetAllFlagz();
    return null;
  }
 else   if (exception.errorCode == ETCD_WATCHER_CLEARED_CODE) {
    try {
      Thread.sleep(reelectionBackoffMs.get());
    }
 catch (    InterruptedException e1) {
    }
    return null;
  }
 else {
    throw new EtcdFlagFieldUpdaterException.EtcdFetchingFailed(exception);
  }
}

private EtcdKeysResponse handleEtcdWatchErrors ( EtcdException exception ) { if ( exception . errorCode == ETCD_EVENT_INDEX_CLEARED_CODE ) { initialSetAllFlagz ( ) ; return null ; } else if ( exception . errorCode == ETCD_WATCHER_CLEARED_CODE ) { try { Thread . sleep ( reelectionBackoffMs . get ( ) ) ; } catch ( InterruptedException e1 ) { } return null ; } else { throw new EtcdFlagFieldUpdaterException . EtcdFetchingFailed ( exception ) ; } }
handles watch issues with watching . see etcd docs :
