You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by yu...@apache.org on 2024/11/12 09:40:07 UTC
(pulsar) 01/02: [improve][admin] Print error log if handle http response fails (#23563)
This is an automated email from the ASF dual-hosted git repository.
yubiao pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit d9685a5db566f8ce70e9ed4bbb81c7e9085bdf86
Author: fengyubiao <yu...@streamnative.io>
AuthorDate: Wed Nov 6 09:37:21 2024 +0800
[improve][admin] Print error log if handle http response fails (#23563)
(cherry picked from commit c15a0d698231ec697f3ec45f7f09eb904d56758c)
---
.../pulsar/client/admin/internal/http/AsyncHttpConnector.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/http/AsyncHttpConnector.java b/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/http/AsyncHttpConnector.java
index bc266962027..ceb7ce42419 100644
--- a/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/http/AsyncHttpConnector.java
+++ b/pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/http/AsyncHttpConnector.java
@@ -310,7 +310,11 @@ public class AsyncHttpConnector implements Connector, AsyncHttpRequestExecutor {
if (response.hasResponseBody()) {
jerseyResponse.setEntityStream(response.getResponseBodyAsStream());
}
- callback.response(jerseyResponse);
+ try {
+ callback.response(jerseyResponse);
+ } catch (Exception ex) {
+ log.error("failed to handle the http response {}", jerseyResponse, ex);
+ }
}
}));
return responseFuture;