https://supertokens.com/ logo
#general
Title
# general
n

nxteword

03/12/2022, 7:07 PM
Copy code
javascript
app.use(errorHandler());

app.use((error: any, req: Request, res: Response) => {
  res.status(error?.statusCode || 500).json({
    success: false,
    error: error?.message || "Server Error",
  });
});