attempt to display error url

deepsource-autofix-76c6eb20
Dan Gowans 2022-10-04 15:09:50 -04:00
parent 3fd54c5120
commit 8b540a3c55
2 changed files with 4 additions and 2 deletions

3
app.js
View File

@ -138,7 +138,8 @@ app.get(urlPrefix + "/logout", (request, response) => {
response.redirect(urlPrefix + "/login"); response.redirect(urlPrefix + "/login");
} }
}); });
app.use((_request, _response, next) => { app.use((request, _response, next) => {
debugApp(request.url);
next(createError(404, "File not found.")); next(createError(404, "File not found."));
}); });
export default app; export default app;

3
app.ts
View File

@ -242,7 +242,8 @@ app.get(urlPrefix + "/logout", (request, response) => {
}); });
// Catch 404 and forward to error handler // Catch 404 and forward to error handler
app.use((_request, _response, next) => { app.use((request, _response, next) => {
debugApp(request.url);
next(createError(404, "File not found.")); next(createError(404, "File not found."));
}); });