Don't redirect on server error. Fixes #570 (#582)

This commit is contained in:
Dessalines 2022-02-17 13:08:13 -05:00 committed by GitHub
parent 99f652422f
commit a406a87146
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -94,7 +94,7 @@ server.get("/*", async (req, res) => {
if (errCode == "instance_is_private") { if (errCode == "instance_is_private") {
return res.redirect(`/signup`); return res.redirect(`/signup`);
} else { } else {
return res.redirect(`/404?err=${errCode}`); return res.send(`404: ${errCode}`);
} }
} }
@ -180,7 +180,7 @@ server.get("/*", async (req, res) => {
`); `);
} catch (err) { } catch (err) {
console.error(err); console.error(err);
return res.redirect(`/404?err=${err}`); return res.send(`404: ${err}`);
} }
}); });