-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sheetal Godara
authored and
Sheetal Godara
committed
Oct 24, 2023
1 parent
8e642a1
commit 0aef911
Showing
1 changed file
with
1 addition
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
const logger = require('../startup/logging'); | ||
module.exports = function(err,req,res,next){ | ||
// error warn info verbose debug silly->message and err object stak trace | ||
logger.log('error',err.message,err); | ||
console.log('error',err.message,err); | ||
res.status(500).send(err);//500 for internal mongodb error can be changed to error .message or err | ||
} |