Skip to content

Commit

Permalink
removed unwanted more file
Browse files Browse the repository at this point in the history
  • 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.
3 changes: 1 addition & 2 deletions middleware/error.js
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
}

0 comments on commit 0aef911

Please sign in to comment.