Module: check_mk
Branch: master
Commit: a5ad24371c34ace9f6fa6ec5f364fa09bc864770
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a5ad24371c34ac…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Sep 7 10:56:53 2017 +0200
5187 FIX WATO sync: Improved error message in case a target site is not running
Change-Id: Ica6e675377995ebf16160670072ca24030fd84d1
---
.werks/5187 | 10 ++++++++++
web/htdocs/watolib.py | 6 +++++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/5187 b/.werks/5187
new file mode 100644
index 0000000..d63288c
--- /dev/null
+++ b/.werks/5187
@@ -0,0 +1,10 @@
+Title: WATO sync: Improved error message in case a target site is not running
+Level: 1
+Component: wato
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1504774581
+Class: fix
+
+
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index 992ddca..7398d0e 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -4055,8 +4055,12 @@ def get_url(url, insecure, auth=None, data=None, files=None):
if response.status_code == 401:
raise MKUserError("_passwd", _("Authentication failed. Invalid
login/password."))
+
+ elif response.status_code == 503 and "Site Not Started" in response.text:
+ raise MKUserError(None, _("Site is not running"))
+
elif response.status_code != 200:
- raise MKUserError("_passwd", _("HTTP Error - %d: %s") %
+ raise MKUserError(None, _("HTTP Error - %d: %s") %
(response.status_code, response.text))
return response.text