Skip to content

Commit

Permalink
Fixes typo in error_handler
Browse files Browse the repository at this point in the history
  • Loading branch information
esalling23 committed Aug 24, 2021
1 parent 33b5bae commit 1b5be6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/error_handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = function (err, req, res, next) {
// if the error came from trying to create a user that already exists,
// the error message will contain a bunch of data about that user.
// That's a major vulnerability, so we need to send back a custom message
const message = 'The receieved params failed a Mongoose validation'
const message = 'The received params failed a Mongoose validation'
err = { status: 422, message }
} else if (err.name === 'DocumentNotFoundError') {
err.status = 404
Expand Down

0 comments on commit 1b5be6b

Please sign in to comment.