From: Dessalines Date: Thu, 17 Feb 2022 18:08:13 +0000 (-0500) Subject: Don't redirect on server error. Fixes #570 (#582) X-Git-Url: http://these/git/%22%7Burl%7D/%22https:/image.com/%7B%60%24%7BghostArchiveUrl%7D/%7BcommunityRss%7D?a=commitdiff_plain;h=a406a87146d4c032f792fcea152656b76a74a3ce;p=lemmy-ui.git Don't redirect on server error. Fixes #570 (#582) --- 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}`); } });