Skip to content

Commit

Permalink
Add log when the route is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuSchl committed Dec 2, 2023
1 parent 0533c50 commit 7de2ca0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions back/functions/apiActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ async function runFolder(path, app) {
module.exports.startApi = async (app) => {
await runFolder("/api", app);
app.get("*", async function (req, res) {
console.log(`ERROR : Route "${req.path}" not found`);
res.sendStatus(404);
});
};
Expand Down

0 comments on commit 7de2ca0

Please sign in to comment.