code: protected Promise retry(Throwable cause, String name, Tree params, CallOptions.Options opts, PacketStream stream,
  			Context parent, String targetID, int remaining) {
  
  		// Write error to log file
  		if (writeErrorsToLog) {
  			logger.error("Unexpected error occurred while invoking \"" + name + "\" action!", cause);
  		}
  
  		// Check error type and error counter
  		if (remaining < 1 || !retryLogic.test(cause)) {
  			return Promise.reject(cause);
  		}
  
  		// Call again...
  		int newRemaining = remaining - 1;
  		if (writeErrorsToLog) {
  			logger.warn("Retrying request (" + newRemaining + " attempts left)...");
  		}
  		return call(name, params, opts, stream, parent, targetID, newRemaining);
  	}
docs: --- RETRY CALL ---