[
https://issues.apache.org/jira/browse/KAFKA-10855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jason Gustafson resolved KAFKA-10855.
-------------------------------------
Resolution: Fixed
> Non-local return in envelope validation in causes unexpected response send
> --------------------------------------------------------------------------
>
> Key: KAFKA-10855
> URL: https://issues.apache.org/jira/browse/KAFKA-10855
> Project: Kafka
> Issue Type: Bug
> Reporter: Jason Gustafson
> Assignee: Jason Gustafson
> Priority: Major
>
> `KafkaApis.handle` uses the following logic to validate the envelope:
> ```
> request.envelope.foreach { envelope =>
> if (maybeHandleInvalidEnvelope(envelope, request.header.apiKey)) {
> return
> }
> }
> ```
> Since this is a non-local return, scala raises an exception, which then
> causes `handleError` to get invoked, which sends an error response.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)