From 8cbd5bbc25e5de2d8124f13eb1e5a8f4fa0d1fd2 Mon Sep 17 00:00:00 2001 From: Zzm0809 <934230207@qq.com> Date: Thu, 5 Dec 2024 15:00:30 +0800 Subject: [PATCH] [Optimization] Optimization scheduler request error assert method (#4011) Co-authored-by: Zzm0809 Co-authored-by: GH Action - Upstream Sync --- .../main/java/org/dinky/scheduler/client/ProjectClient.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dinky-scheduler/src/main/java/org/dinky/scheduler/client/ProjectClient.java b/dinky-scheduler/src/main/java/org/dinky/scheduler/client/ProjectClient.java index 3c349fd023..b09872453e 100644 --- a/dinky-scheduler/src/main/java/org/dinky/scheduler/client/ProjectClient.java +++ b/dinky-scheduler/src/main/java/org/dinky/scheduler/client/ProjectClient.java @@ -70,7 +70,7 @@ public Project createDinkyProject() { .form(map) .timeout(5000) .execute(); - if (httpResponse.getStatus() != 200) { + if (!httpResponse.isOk()) { SystemConfiguration.getInstances().getDolphinschedulerEnable().setValue(false); logger.error("DolphInScheduler connection failed, Reason: {}", httpResponse.getStatus()); return null; @@ -101,7 +101,7 @@ public Project getDinkyProject() { .timeout(5000) .execute(); - if (httpResponse.getStatus() != 200) { + if (!httpResponse.isOk()) { SystemConfiguration.getInstances().getDolphinschedulerEnable().setValue(false); logger.error("DolphInScheduler connection failed, Reason: {}", httpResponse.getStatus()); return null;