From a406a87146d4c032f792fcea152656b76a74a3ce Mon Sep 17 00:00:00 2001 From: Dessalines <dessalines@users.noreply.github.com> Date: Thu, 17 Feb 2022 13:08:13 -0500 Subject: [PATCH] Don't redirect on server error. Fixes #570 (#582) --- 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 82d0379..bb7f64d 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}`); } }); -- 2.44.1