Skip to content

Commit

Permalink
print all errors during backend dev
Browse files Browse the repository at this point in the history
  • Loading branch information
maidul98 committed Jan 4, 2023
1 parent fba40b5 commit 880f4d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/middleware/requestErrorHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 880f4d2

Please sign in to comment.