[ 
https://issues.apache.org/jira/browse/KAFKA-18157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17903424#comment-17903424
 ] 

Chia-Ping Tsai commented on KAFKA-18157:
----------------------------------------

{quote}
UnsupportedVersionException is part of our public api, we may need a small kip 
to change it.
{quote}

If we want to expose the new exception to users to provide more details, the 
answer is yes—we need a KIP to introduce the new exception and add it to the 
related public APIs. However, my original comment was that the new exception is 
intended for internal use and is a subclass of UnsupportedVersionException, 
allowing users to continue catching the UnsupportedVersionException type for 
compatibility.

In short, we can address this JIRA without a KIP if the goal is to replace 
string checks with exception checks.


> Consider UnsupportedVersionException child class to represent the case of 
> unsupported fields
> --------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-18157
>                 URL: https://issues.apache.org/jira/browse/KAFKA-18157
>             Project: Kafka
>          Issue Type: Improvement
>          Components: clients
>            Reporter: Lianet Magrans
>            Assignee: TengYao Chi
>            Priority: Minor
>
> [https://github.com/apache/kafka/pull/17989#discussion_r1869333289] 
>  
> Adding more pointers, I expect that when the Unsupported exceptions is due to 
> fields validation it comes from building the request on 
> [https://github.com/apache/kafka/blob/f60382bf21601b1c6708d094fadb13de59a77278/clients/src/main/java/org/apache/kafka/clients/NetworkClient.java#L582]
>  , vs when it happens because the API is not supported, it should be detected 
> when checking the usable version on 
> [https://github.com/apache/kafka/blob/81447c7c9543d56e2fce76b861d3918d4cac6a2a/clients/src/main/java/org/apache/kafka/clients/NodeApiVersions.java#L155]
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to