We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Throw a new error is pretty easy
import sendError from "../util/error";
[...]
app.get("/", (req, res) => { do.myWork().then(() => { // Handle something }).catch((err) => { sendError(req, res, err); // Send the Error }); });
This will show a 500 page and if the hostname is localhost:3000 or dev.savetheinternet.info it will show the error message
localhost:3000
dev.savetheinternet.info
There was an error while loading. Please reload this page.