Skip to content

Commit

Permalink
Merge pull request #8148 from ouyuran/patch-1
Browse files Browse the repository at this point in the history
Add StrictModeError to MongooseError
  • Loading branch information
vkarpov15 committed Sep 10, 2019
2 parents a4c3e10 + f17e255 commit 6b28ee0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/error/index.js
Expand Up @@ -166,3 +166,15 @@ MongooseError.MissingSchemaError = require('./missingSchema');
*/

MongooseError.DivergentArrayError = require('./divergentArray');

/**
* Thrown when your try to pass values to model contrtuctor that
* were not specified in schema or change immutable properties when
* `strict` mode is `"throw"`
*
* @api public
* @memberOf Error
* @static StrictModeError
*/

MongooseError.StrictModeError = require('./strict');

0 comments on commit 6b28ee0

Please sign in to comment.