ManimCat / src /http /middleware /not-found-handler.ts
Bin29's picture
Deploy 5548f84: pre-sandbox v2.0.0-beta.1 snapshot
10dd572
Raw History Blame Contribute Delete
296 Bytes
/**
* 404 Not Found boundary.
*/
import type { Request, Response, NextFunction } from 'express'
export function notFoundHandler(req: Request, res: Response, _next: NextFunction): void {
res.status(404).json({
error: 'Route not found',
path: req.path,
method: req.method,
})
}