Corlobin opened a new pull request #11844: URL: https://github.com/apache/kafka/pull/11844
As described in Jira: 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. **So this PR fixes this problem - simple catch the exception and rethrow it, keeping the original http status.** ### Committer Checklist (excluded from commit message) - [x] Verify design and implementation - [x] Verify test coverage and CI build status - [x] Verify documentation (including upgrade notes) -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
