From 5ffb388e83900bfbe862af0ddf3bb92ed48d5476 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 17 Feb 2022 13:06:09 -0500 Subject: [PATCH] Don't redirect on server error. Fixes #570 --- src/server/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/index.tsx b/src/server/index.tsx index 82d0379b..bb7f64d9 100644 --- a/src/server/index.tsx +++ b/src/server/index.tsx @@ -94,7 +94,7 @@ server.get("/*", async (req, res) => { if (errCode == "instance_is_private") { return res.redirect(`/signup`); } else { - return res.redirect(`/404?err=${errCode}`); + return res.send(`404: ${errCode}`); } } @@ -180,7 +180,7 @@ server.get("/*", async (req, res) => { `); } catch (err) { console.error(err); - return res.redirect(`/404?err=${err}`); + return res.send(`404: ${err}`); } });