We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc38a26 commit 023b3c0Copy full SHA for 023b3c0
lib/schema.js
@@ -2799,8 +2799,13 @@ Schema.prototype._getPathType = function(path) {
2799
return search(path.split('.'), _this);
2800
};
2801
2802
-/*!
+/**
2803
+ * Transforms the duplicate key error by checking for duplicate key error messages by path.
2804
+ * If no duplicate key error messages are found, returns the original error.
2805
*
2806
+ * @param {Error} error The error to transform
2807
+ * @returns {Error} The transformed error
2808
+ * @api private
2809
*/
2810
2811
Schema.prototype._transformDuplicateKeyError = function _transformDuplicateKeyError(error) {
0 commit comments