rp_st
03/12/2022, 7:10 PMapp.use((error: any, req: Request, res: Response, next: express.NextFunction) => {
res.status(error?.statusCode || 500).json({
success: false,
error: error?.message || "Server Error",
});
});
And see if this works.