Tweak exception messages to hopefully help debugging if this happens

This commit is contained in:
Alexandre Aubin 2020-03-22 01:40:02 +01:00
parent 87a3ceb983
commit 4399c9b740
2 changed files with 2 additions and 2 deletions

View file

@ -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)

View file

@ -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)