dajac commented on code in PR #15196: URL: https://github.com/apache/kafka/pull/15196#discussion_r1458564906
########## group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupCoordinatorService.java: ########## @@ -1098,30 +1054,36 @@ private static boolean isGroupIdNotEmpty(String groupId) { return groupId != null && !groupId.isEmpty(); } - /** - * Handles the exception in the scheduleWriteOperation. - * @return The Errors instance associated with the given exception. - */ - private static Errors normalizeException(Throwable exception) { - exception = Errors.maybeUnwrapException(exception); - - if (exception instanceof UnknownTopicOrPartitionException || - exception instanceof NotEnoughReplicasException || - exception instanceof TimeoutException) { - return Errors.COORDINATOR_NOT_AVAILABLE; - } - - if (exception instanceof NotLeaderOrFollowerException || - exception instanceof KafkaStorageException) { - return Errors.NOT_COORDINATOR; - } - - if (exception instanceof RecordTooLargeException || - exception instanceof RecordBatchTooLargeException || - exception instanceof InvalidFetchSizeException) { - return Errors.UNKNOWN_SERVER_ERROR; + private <REQ, RSP> RSP handleOperationException( Review Comment: Done. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org