Skip to content

Commit

Permalink
fix: remove stack from error logging:
Browse files Browse the repository at this point in the history
  • Loading branch information
wajeshubham committed Feb 7, 2024
1 parent db18911 commit 6ae6d60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/middlewares/error.middlewares.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const errorHandler = (err, req, res, next) => {
...(process.env.NODE_ENV === "development" ? { stack: error.stack } : {}), // Error stack traces should be visible in development for debugging
};

logger.error(`An error occurred: ${error.message}`, { stack: error.stack });
logger.error(`${error.message}`);

removeUnusedMulterImageFilesOnError(req);
// Send error response
Expand Down

0 comments on commit 6ae6d60

Please sign in to comment.