Don't redirect on server error. Fixes #570

This commit is contained in:
Dessalines 2022-02-17 13:06:09 -05:00
parent 99f652422f
commit 5ffb388e83

View file

@ -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}`);
}
});