From 2194f55d6858016420e5846279421946efdccf9c Mon Sep 17 00:00:00 2001 From: TheMaddax Date: Sun, 14 Dec 2025 16:46:13 -0700 Subject: [PATCH] Fix Express 5 404 handler: Use middleware pattern instead of route Express 5 doesn't support wildcard routes with app.all('*'). Changed to standard middleware pattern: app.use((req, res) => {...}) --- backend/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/index.ts b/backend/src/index.ts index 0d3f05eb..f601fc74 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -133,8 +133,8 @@ app.use('/api/documents', documentRoutes); app.use('/api/subscriptions', subscriptionRoutes); app.use('/api/notifications', notificationRoutes); -// 404 handler - Express 5 requires explicit path -app.all('*', (req, res) => { +// 404 handler - Express 5 compatible +app.use((req, res) => { res.status(404).json({ success: false, message: 'Route not found',