print all errors during backend dev

This commit is contained in:
Maidul Islam
2023-01-04 17:35:40 -05:00
parent fba40b5d4b
commit 880f4d25a9

View File

@@ -9,7 +9,7 @@ import { NODE_ENV } from "../config";
export const requestErrorHandler: ErrorRequestHandler = (error: RequestError | Error, req, res, next) => {
if (res.headersSent) return next();
if (NODE_ENV !== "production" && error instanceof RequestError) {
if (NODE_ENV !== "production") {
/* eslint-disable no-console */
console.log(error)
/* eslint-enable no-console */