code: private void checkForFailure(FilterJoinNode node) {
      if (node.hasFailure()) {
        logger.error("Node processing failed: {}", node.getFailure());
        throw new ElasticsearchException("Unexpected failure while processing a node", node.getFailure());
      }
    }
docs: Checks for an action failure