Skip to content

Commit

Permalink
Merge pull request #11844 from Uzlopak/fix-documentation-error
Browse files Browse the repository at this point in the history
fix documention of error handling
  • Loading branch information
vkarpov15 authored May 28, 2022
2 parents 051726c + f6beceb commit 8a90742
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/error/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
* Mongoose-specific errors.
*
* #### Example:
* const Model = mongoose.model('Test', new Schema({ answer: Number }));
* const Model = mongoose.model('Test', new mongoose.Schema({ answer: Number }));
* const doc = new Model({ answer: 'not a number' });
* const err = doc.validateSync();
*
* err instanceof mongoose.Error; // true
* err instanceof mongoose.Error.ValidationError; // true
*
* @constructor Error
* @param {String} msg Error message
Expand Down

0 comments on commit 8a90742

Please sign in to comment.