Elkhan Eminov created KAFKA-13702:
-------------------------------------
Summary: 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
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)