@Override
    public RuntimeException handleFault(String failureMessage, Throwable cause) {
        if (cause == null) {
            log.error("Encountered {} fault: {}", type, failureMessage);
        } else {
            log.error("Encountered {} fault: {}", type, failureMessage, cause);
        }
        try {
            action.run();
        } catch (Throwable e) {
            log.error("Failed to run LoggingFaultHandler action.", e);
        }
        return new FaultHandlerException(failureMessage, cause);
    }
A fault handler which logs an error message and executes a runnable.
server-common/src/main/java/org/apache/kafka/server/fault/LoggingFaultHandler.java