Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
/// Print API errors
// eslint-disable-next-line @typescript-eslint/no-unused-vars
app.use((err: Error, req: Request, res: Response, next: NextFunction) => {
logger.error(err.message, err);
return res.status(BAD_REQUEST).json({
error: err.message,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment