diff --git a/src/main/java/com/hisense/monitormanage/service/MonitorService.java b/src/main/java/com/hisense/monitormanage/service/MonitorService.java index 74adaed..3d6a056 100644 --- a/src/main/java/com/hisense/monitormanage/service/MonitorService.java +++ b/src/main/java/com/hisense/monitormanage/service/MonitorService.java @@ -115,12 +115,16 @@ public class MonitorService { if (e.getStatusCode() == HttpStatus.UNAUTHORIZED) { String responseString = e.getResponseBodyAsString(); reponse = JSONObject.parseObject(responseString, HashMap.class); + } else { + reponse = null; } + } catch (Exception exception) { + reponse = null; } if (reponse == null) { log.error("[monitor-capture]:" + "监控系统登录握手失败"); - throw new RuntimeException("监控系统登录握手失败"); + return; } //登录