This is an automated email from the ASF dual-hosted git repository.

dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new 65e44b4e9 [INLONG-7769][DataProxy] Fix NPE when request Inlong Manager 
failed (#7770)
65e44b4e9 is described below

commit 65e44b4e934fcaa0b55e90bf065a4408205f1026
Author: vernedeng <[email protected]>
AuthorDate: Thu Apr 6 09:24:04 2023 +0800

    [INLONG-7769][DataProxy] Fix NPE when request Inlong Manager failed (#7770)
---
 .../org/apache/inlong/dataproxy/config/RemoteConfigManager.java     | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git 
a/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/config/RemoteConfigManager.java
 
b/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/config/RemoteConfigManager.java
index dc2548edb..8f50930c5 100644
--- 
a/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/config/RemoteConfigManager.java
+++ 
b/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/config/RemoteConfigManager.java
@@ -205,6 +205,12 @@ public class RemoteConfigManager implements IRepository {
             LOGGER.info("start to request {} to get config info with params 
{}", url, request);
             CloseableHttpResponse response = httpClient.execute(httpPost);
             String returnStr = EntityUtils.toString(response.getEntity());
+
+            if (response.getStatusLine().getStatusCode() != 200) {
+                LOGGER.info("failed to request {}, the response is {}", url, 
returnStr);
+                return false;
+            }
+
             LOGGER.info("end to request {} to get config info:{}", url, 
returnStr);
             // get groupId <-> topic and m value.
 

Reply via email to