gistlib
index.tsimport { Request, Response, NextFunction } from 'express'; export const errorHandler = (err: Error, req: Request, res: Response, next: NextFunction) => { console.error(err); res.status(500).json({ message: 'Internal Server Error' }); }; 258 chars9 lines
import { Request, Response, NextFunction } from 'express'; export const errorHandler = (err: Error, req: Request, res: Response, next: NextFunction) => { console.error(err); res.status(500).json({ message: 'Internal Server Error' }); };
gistlibby LogSnag