From c7b8bb9e4aef849cb3259b73f8c38148d72058ab Mon Sep 17 00:00:00 2001 From: Nelson Chan <3271800+chakflying@users.noreply.github.com> Date: Wed, 28 Feb 2024 18:57:58 +0800 Subject: [PATCH] Fix: Incorrect handling of status page not found (#4537) --- server/routers/status-page-router.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/server/routers/status-page-router.js b/server/routers/status-page-router.js index 29acaf8e..42cccc94 100644 --- a/server/routers/status-page-router.js +++ b/server/routers/status-page-router.js @@ -40,16 +40,12 @@ router.get("/api/status-page/:slug", cache("5 minutes"), async (request, respons ]); if (!statusPage) { + sendHttpError(response, "Status Page Not Found"); return null; } let statusPageData = await StatusPage.getStatusPageData(statusPage); - if (!statusPageData) { - sendHttpError(response, "Not Found"); - return; - } - // Response response.json(statusPageData);