forked from shadowfacts/shadowfacts.net
Log errors in addition to sending response
This commit is contained in:
parent
99637521d4
commit
6e785fb0a1
|
@ -75,6 +75,7 @@ async function generate(): Promise<Page[]> {
|
||||||
app.use(express.static("out"));
|
app.use(express.static("out"));
|
||||||
|
|
||||||
app.use((err, req, res, next) => {
|
app.use((err, req, res, next) => {
|
||||||
|
console.error("Unhandled error:", err);
|
||||||
res.status(500).sendFile("500.html", {
|
res.status(500).sendFile("500.html", {
|
||||||
root: "out"
|
root: "out"
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue