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;