loicgreffier commented on code in PR #16300: URL: https://github.com/apache/kafka/pull/16300#discussion_r1686582263
########## streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamTask.java: ########## @@ -916,7 +920,17 @@ public void punctuate(final ProcessorNode<?, ?, ?, ?> node, } catch (final StreamsException e) { throw e; } catch (final RuntimeException e) { - throw new StreamsException(String.format("%sException caught while punctuating processor '%s'", logPrefix, node.name()), e); + final ErrorHandlerContext errorHandlerContext = new DefaultErrorHandlerContext(recordContext.topic(), + recordContext.partition(), recordContext.offset(), recordContext.headers(), null, null, node.name(), id); + + final ProcessingExceptionHandler.ProcessingHandlerResponse response = processingExceptionHandler + .handle(errorHandlerContext, null, e); + + if (response == ProcessingExceptionHandler.ProcessingHandlerResponse.FAIL) { + throw new StreamsException(String.format("%sException caught while punctuating processor '%s'", logPrefix, node.name()), e); Review Comment: Done. `process()` and `punctuate` will log the same error -- 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