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

Antonio Ricardo Alexandre Brasil commented on KAFKA-13702:
----------------------------------------------------------

I've made the PR: https://github.com/apache/kafka/pull/11844

> Connect RestClient overrides response status code on request failure
> --------------------------------------------------------------------
>
>                 Key: KAFKA-13702
>                 URL: https://issues.apache.org/jira/browse/KAFKA-13702
>             Project: Kafka
>          Issue Type: Bug
>          Components: KafkaConnect
>            Reporter: Elkhan Eminov
>            Priority: Major
>
> In case the submitted request status is >=400, the connect RestClient 
> [throws|https://github.com/apache/kafka/blob/8047ba3800436d6162d0f8eb707e28857ab9eb68/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/RestClient.java#L133]
>  a ConnectRestException with the proper response code, but it gets 
> intercepted and [rethrown with 500 status 
> code|https://github.com/apache/kafka/blob/8047ba3800436d6162d0f8eb707e28857ab9eb68/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/RestClient.java#L147],
>  effectively overriding the actual failure status. 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to