public void checkError() {
        // check session error
        try {
            checkAsyncErrors();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        // check flush error
        Throwable throwable = flushThrowable.get();
        if (throwable != null) {
            throw new RuntimeException("An asynchronous exception is caught " +
                    "in the kudu sink.", throwable);
        }
    }
The exception caught in asynchronous tasks.
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/kudu/src/main/java/org/apache/inlong/sort/kudu/sink/KuduWriter.java