/
1Rrd0
/
Course
Обзор
Документация
Войти
/
1Rrd0
/
Course
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
node_modules/mongoose/lib/error/objectExpected.js
31 строка
637 B
dima
2
13 дек 2025, 10:58
13 дек 2025, 10:58
ce5a48e
Код
Авторство
О чём код?
/*! * Module dependencies. */ 'use strict'; const MongooseError = require('./mongooseError'); /** * Strict mode error constructor * * @param {string} type * @param {string} value * @api private */ class ObjectExpectedError extends MongooseError { constructor(path, val) { const typeDescription = Array.isArray(val) ? 'array' : 'primitive value'; super('Tried to set nested object field `' + path + `\` to ${typeDescription} \`` + val + '`'); this.path = path; } } Object.defineProperty(ObjectExpectedError.prototype, 'name', { value: 'ObjectExpectedError' }); module.exports = ObjectExpectedError;