Add error handling

This commit is contained in:
KS Jannette
2026-02-12 06:49:13 -05:00
parent 237c390f40
commit 123fe1654f
2 changed files with 6 additions and 2 deletions

View File

@@ -9,4 +9,8 @@ app.use(express.json());
app.use('/v1/notes', notesRoutes);
app.use((req, res) => {
res.status(404).json({ error: `Requested path is invalid or does not exist: ${req.method} ${req.originalUrl}` });
});
export default app;