From fb22c6df2958fdbaa64ada66b1c3b5044f916b10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20K=C3=BCnzel?= <simonk@fsmpi.rwth-aachen.de> Date: Sun, 2 Jun 2024 16:24:56 +0200 Subject: [PATCH] Fix 'unavailable' status, Closes #27 --- src/api/routes/site.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/api/routes/site.py b/src/api/routes/site.py index 9ed4eda..b447722 100644 --- a/src/api/routes/site.py +++ b/src/api/routes/site.py @@ -29,7 +29,9 @@ def api_route_status(): try: announcements.extend(query_announcements()) except Exception: - status = "unavailable" + # We do NOT return status 'unavailable' because the status is the EXPECTED status. If there is an unexpected + # db failure, we want errors to show up and not just 'Site not available' + pass response = { "status": status, "is_debug": DEBUG_ENABLED, -- GitLab