From 204792dd2d0b40f343d1fc04811d05556f032eb7 Mon Sep 17 00:00:00 2001 From: Nelson Chan Date: Tue, 3 Jan 2023 22:07:14 +0800 Subject: [PATCH] Fix: Fix incorrect handling for container down --- server/model/monitor.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index 2c260e96a..9f8c8300a 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -514,7 +514,9 @@ class Monitor extends BeanModel { let res = await axios.request(options); if (res.data.State.Running) { bean.status = UP; - bean.msg = ""; + bean.msg = res.data.State.Status; + } else { + throw Error("Container State is " + res.data.State.Status); } } else if (this.type === "mqtt") { bean.msg = await mqttAsync(this.hostname, this.mqttTopic, this.mqttSuccessMessage, {