chia7712 commented on code in PR #16282: URL: https://github.com/apache/kafka/pull/16282#discussion_r1635307088
########## connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/RestClient.java: ########## @@ -189,9 +190,13 @@ private <T> HttpResponse<T> httpRequest(HttpClient client, String url, String me Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Unexpected status code when handling forwarded request: " + responseCode); } - } catch (IOException | InterruptedException | TimeoutException | ExecutionException e) { + } catch (IOException | TimeoutException | ExecutionException e) { log.error("IO error forwarding REST request to {} :", url, e); throw new ConnectRestException(Response.Status.INTERNAL_SERVER_ERROR, "IO Error trying to forward REST request: " + e.getMessage(), e); + } catch (InterruptedException e) { + log.error("Thread was interrupted forwarding REST request to {} :", url, e); + Thread.currentThread().interrupt(); Review Comment: Could you please give a try of adding unit test? ########## connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/RestClient.java: ########## @@ -77,7 +77,7 @@ HttpClient httpClient(SslContextFactory.Client sslContextFactory) { * @return The deserialized response to the HTTP request, containing null if no data is expected or returned. */ public <T> HttpResponse<T> httpRequest(String url, String method, HttpHeaders headers, Object requestBodyData, - TypeReference<T> responseFormat) { Review Comment: Could you please revert those unrelated changes? It makes this PR smaller :) -- 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