From f17e2553969f9ef67b3e1df7f0ad0b9995283571 Mon Sep 17 00:00:00 2001 From: ouyuran <50813733+ouyuran@users.noreply.github.com> Date: Tue, 10 Sep 2019 10:40:38 +0800 Subject: [PATCH] Update index.js --- lib/error/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/error/index.js b/lib/error/index.js index 25d050fcbd7..ee141e69bed 100644 --- a/lib/error/index.js +++ b/lib/error/index.js @@ -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');