Skip to content

Commit 023b3c0

Browse files
committed
docs: add comment for _transformDuplicateKeyError
1 parent cc38a26 commit 023b3c0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/schema.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2799,8 +2799,13 @@ Schema.prototype._getPathType = function(path) {
27992799
return search(path.split('.'), _this);
28002800
};
28012801

2802-
/*!
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.
28032805
*
2806+
* @param {Error} error The error to transform
2807+
* @returns {Error} The transformed error
2808+
* @api private
28042809
*/
28052810

28062811
Schema.prototype._transformDuplicateKeyError = function _transformDuplicateKeyError(error) {

0 commit comments

Comments
 (0)