Update server.js
This commit is contained in:
parent
71627c7041
commit
69ad2c8f83
@ -143,10 +143,6 @@ for (const route of routes) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
app.all(/.*/, (req, res, next) => {
|
|
||||||
next(new DefaultError(404, `Can't find ${req.originalUrl} on this server!`, null, "NotFound"))
|
|
||||||
})
|
|
||||||
|
|
||||||
app.use((err, req, res, next) => {
|
app.use((err, req, res, next) => {
|
||||||
const statusCode = err.statusCode || err.code || 500
|
const statusCode = err.statusCode || err.code || 500
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user