void handleSessionErrorCode(Errors errorCode) {
            acknowledgementsMap.forEach((tip, acks) -> {
                if (acks != null) {
                    acks.setAcknowledgeErrorCode(errorCode);
                }
                resultHandler.complete(tip, acks);
            });
            acknowledgementsMap.clear();
            processingComplete();
        }
Set the error code for all remaining acknowledgements in the event
of a session error which prevents the remains acknowledgements from
being sent.
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareConsumeRequestManager.java