ijuma commented on code in PR #18497: URL: https://github.com/apache/kafka/pull/18497#discussion_r1922780149
########## clients/src/main/java/org/apache/kafka/common/requests/RequestHeader.java: ########## @@ -144,10 +151,12 @@ public static RequestHeader parse(ByteBuffer buffer) { header.size = Math.max(buffer.position() - bufferStartPositionForHeader, 0); return header; } catch (UnsupportedVersionException e) { - throw new InvalidRequestException("Unknown API key " + apiKey, e); + throw new InvalidRequestException("Unknown API key " + apiKeyId, e); } catch (Throwable ex) { - throw new InvalidRequestException("Error parsing request header. Our best guess of the apiKey is: " + - apiKey, ex); + if (ex instanceof InvalidRequestException) Review Comment: Makes sense - not sure why I didn't write that in the first place! -- 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