Website : rimsha.abasa.com
backdoor
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
exp-backend
/
src
/
middleware
/
Filename :
catchAsync.ts
back
Copy
import { NextFunction } from "express"; export const catchAsync = (fn: Function) => { return (req: Request, res: Response, next: NextFunction) => { fn(req, res, next).catch((err: any) => next(err)); }; };