overleaf/overleaf · error
Not Found (catch-all route res.sendStatus(404))
Error message
Not Found (catch-all route res.sendStatus(404))
What it means
Catch-all GET route in the notifications service: any request path not matching the defined notification routes is answered with a bare 404 before reaching any controller.
Source
Thrown at services/notifications/app.ts:50
app.post('/user/:user_id', NotificationsController.addNotification)
app.get('/user/:user_id', NotificationsController.getUserNotifications)
app.delete(
'/user/:user_id/notification/:notification_id',
NotificationsController.removeNotificationId
)
app.delete('/user/:user_id', NotificationsController.removeNotificationKey)
app.delete('/key/:key', NotificationsController.removeNotificationByKeyOnly)
app.get('/key/:key/count', NotificationsController.countNotificationsByKeyOnly)
app.delete(
'/key/:key/bulk',
NotificationsController.deleteUnreadNotificationsByKeyOnlyBulk
)
app.get('/status', (req, res) => res.send('notifications is up'))
app.get('/health_check', HealthCheckController.check)
app.get('*', (req, res) => res.sendStatus(404))
const handleApiError: ErrorRequestHandler = (
err: Error,
req: Request,
res: Response,
next: NextFunction
) => {
req.logger.addFields({ err })
if (err instanceof InvalidParamsError) {
req.logger.setLevel('warn')
res.sendStatus(404)
} else if (err instanceof InvalidRequestError) {
req.logger.setLevel('warn')
res.sendStatus(400)
} else {
req.logger.setLevel('error')
res.sendStatus(500)
}View on GitHub (pinned to 28ad3b03b7)
Solutions
- Check the request path against the documented notifications API routes
- Correct typos or outdated route prefixes in the client call
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at services/notifications/app.ts:50 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of overleaf/overleaf@28ad3b03b7 (2026-09-03).
Data as JSON: /api/errors/90ef87d063db4aff.
Report an issue: GitHub.