return 500 on fail

This commit is contained in:
2020-06-22 21:45:05 +02:00
parent 5e21681efa
commit 7f46c2d741

View File

@@ -21,7 +21,7 @@ def run(port, parser):
def health(): def health():
try: try:
count, avgPred = db.check() count, avgPred = db.check()
return ("Rounds: {}, AvgPrediction (lower than 0.5 is good): {}".format(count, avgPred)) return ("Rounds: {}, AvgPrediction (lower than 0.5 is good): {}".format(count, avgPred), 500)
except AssertionError as e: except AssertionError as e:
return ("{}".format(e), 200) return ("{}".format(e), 200)