From 4399c9b740b5c4901de76f5b2245df4b349eae89 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 22 Mar 2020 01:40:02 +0100 Subject: [PATCH] Tweak exception messages to hopefully help debugging if this happens --- data/hooks/diagnosis/14-ports.py | 2 +- data/hooks/diagnosis/16-http.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/hooks/diagnosis/14-ports.py b/data/hooks/diagnosis/14-ports.py index aaf31d561..9c0e94721 100644 --- a/data/hooks/diagnosis/14-ports.py +++ b/data/hooks/diagnosis/14-ports.py @@ -39,7 +39,7 @@ class PortsDiagnoser(Diagnoser): elif r["status"] != "ok" or "ports" not in r.keys() or not isinstance(r["ports"], dict): raise Exception("Bad syntax for response ? Raw json: %s" % str(r)) else: - raise Exception("Bad response from the server https://diagnosis.yunohost.org : %s" % str(r.status_code)) + raise Exception("Bad response from the server https://diagnosis.yunohost.org/check-ports : %s - %s" % (str(r.status_code), r.content)) except Exception as e: raise YunohostError("diagnosis_ports_could_not_diagnose", error=e) diff --git a/data/hooks/diagnosis/16-http.py b/data/hooks/diagnosis/16-http.py index ac30dad78..d36e85f41 100644 --- a/data/hooks/diagnosis/16-http.py +++ b/data/hooks/diagnosis/16-http.py @@ -39,7 +39,7 @@ class HttpDiagnoser(Diagnoser): else: raise Exception("Bad syntax for response ? Raw json: %s" % str(r)) else: - raise Exception("Bad response from the server https://diagnosis.yunohost.org : %s" % str(r.status_code)) + raise Exception("Bad response from the server https://diagnosis.yunohost.org/check-http : %s - %s" % (str(r.status_code), r.content)) except Exception as e: raise YunohostError("diagnosis_http_could_not_diagnose", error=e)