ErrLookup › Automattic/mongoose
Automattic/mongoose
MongoDB object modeling designed to work in an asynchronous environment. · JavaScript · 307 source files
Analyzed at 49cdab0136 on 2026-08-21. 351 documented errors.
| Code / Message | Type | Severity | Tags |
|---|---|---|---|
| Arguments must be aggregate pipeline operators | exception | error | mongoose, model-registration, collection-name, typeerror, validation |
| Invalid addFields() argument. Must be an object | exception | error | mongoose, populate, typeerror, invalid-argument, query |
| Invalid project() argument. Must be string or object | exception | error | mongoose, internal, error-handling, typeerror, serialization |
| Aggregate `near()` must be called with non-nullish argument | exception | warning | mongoose, schema, reserved-name, warning, naming |
| Aggregate `near()` argument must have a `near` property | exception | warning | mongoose, deprecation, validation, document, mongoose-10 |
| Aggregate `near()` argument has invalid coordinates, got "${ | exception | warning | mongoose, deprecation, document, change-tracking, mongoose-10 |
| Invalid arg "${arg}" to unwind(), must be string or object | exception | warning | mongoose, schema-methods, reserved-name, prototype-collision, warning |
| Invalid arg "${arg}" to sortByCount(), must be string or obj | exception | warning | mongoose, jest, jsdom, test-environment, warning |
| Invalid graphLookup() argument. Must be an object. | exception | warning | mongoose, jest, fake-timers, testing, warning |
| Invalid sort() argument. Must be a string or object. | exception | warning | mongoose, indexes, mongodb, schema, warning |
| If thenExpr or elseExpr is string, it must be either $$DESCE | exception | warning | mongoose, indexes, schema, duplicate, warning |
| Invalid arguments | exception | warning | mongoose, transactions, session, model-create, api-misuse |
| Aggregate.prototype.explain() no longer accepts a callback | exception | warning | mongoose, deprecation, configuration, query-options, upgrade |
| Aggregate has empty pipeline | exception | warning | mongoose, deprecation, findoneandupdate, query-options, upgrade |
| Aggregate pipeline for $unionWith cannot include `$out` or ` | exception | warning | mongoose, deprecation, findoneandupdate, query-options, upgrade |
| Aggregate not bound to any Model | exception | warning | mongoose, objectid, schema-types, api-confusion, warning |
| Aggregate.prototype.exec() no longer accepts a callback | exception | warning | mongoose, subdocument, save, nested-documents, api-misuse |
| Query filter must be an object, got an array ${util.inspect( | exception | error | mongoose, query, cast, filter, validation |
| Cast to Array failed for value "${value}" at path "${path}" | exception | error | mongoose, query, cast, logical-operators |
| Cast to Object failed for value "${value}" at path "${path}. | exception | error | mongoose, query, cast, logical-operators, null-safety |
| Bad $within parameter: ${JSON.stringify(val)} | exception | error | mongoose, geospatial, legacy, query |
| Invalid geoJSON type for $geoWithin "${geoWithinType}", must | exception | error | mongoose, geojson, geospatial, query |
| Field `${path}` is not in schema and strict mode is set to t | exception | error | mongoose, strict-mode, upsert, schema |
| Path "${path}" is not in schema, strict mode is `true`, and | exception | error | mongoose, strict-mode, upsert, schema |
| Path "${path}" is not in schema and strictQuery is 'throw'. | exception | error | mongoose, strict-query, schema, query |
| Mongoose only supports BigInts between -9223372036854775808 | exception | error | mongoose, bigint, int64, cast |
| Cannot convert value to BigInt: "${val}" | exception | error | mongoose, bigint, cast, type-conversion |
| Cast to boolean failed for value "${value}" at path "${path} | exception | error | mongoose, boolean, cast, form-input |
| Cast to Number failed: value is not a valid number | exception | error | mongoose, number, cast, nan |
| Cast to string failed for value "${value}" at path "${path}" | exception | error | mongoose, string, cast, objects |
| "${value}" is not a valid UUID string | exception | error | mongoose, uuid, cast, format-validation |
| "${value}" cannot be casted to a UUID | exception | error | mongoose, uuid, cast, type-mismatch |
| Collection#ensureIndex unimplemented by driver | exception | error | mongoose, driver, index, legacy-api |
| Collection#createIndex unimplemented by driver | exception | error | mongoose, driver, index, testing |
| Collection#findAndModify unimplemented by driver | exception | error | mongoose, driver, legacy-api, find-and-modify |
| Collection#findOneAndUpdate unimplemented by driver | exception | error | |
| Collection#findOneAndDelete unimplemented by driver | exception | error | |
| Collection#findOneAndReplace unimplemented by driver | exception | error | |
| Collection#findOne unimplemented by driver | exception | error | |
| Collection#find unimplemented by driver | exception | error | |
| Collection#insert unimplemented by driver | exception | error | |
| Collection#insertOne unimplemented by driver | exception | error | |
| Collection#insertMany unimplemented by driver | exception | error | |
| Collection#save unimplemented by driver | exception | error | |
| Collection#updateOne unimplemented by driver | exception | error | |
| Collection#updateMany unimplemented by driver | exception | error | |
| Collection#deleteOne unimplemented by driver | exception | error | |
| Collection#deleteMany unimplemented by driver | exception | error | |
| Collection#getIndexes unimplemented by driver | exception | error | |
| Collection#watch unimplemented by driver | exception | error | |
| Invalid connection state: ${val} | validation | error | |
| Connection.prototype.createCollection() no longer accepts a | exception | error | |
| Must specify model in Connection.prototype.bulkWrite() opera | validation | error | |
| Must specify operation name in Connection.prototype.bulkWrit | validation | error | |
| Unrecognized bulkWrite() operation name ${op.name} | validation | error | |
| bulkWrite failed with ${validationErrors.length} Mongoose va | exception | error | bulk-write, schema-validation, ordered-false, throwonvalidationerror |
| Please provide an executor function | validation | error | session, missing-argument, api-misuse |
| Connection.prototype.startSession() no longer accepts a call | exception | error | session, callbacks, migration, mongoose-7 |
| Connection.prototype.dropCollection() no longer accepts a ca | exception | error | dropcollection, callbacks, migration, mongoose-7 |
| Connection operation buffering timed out after ${bufferTimeo | exception | error | connection, timeout, buffering, startup |
| listDatabases() not implemented by driver | exception | error | driver, listdatabases, abstract-method |
| Connection.prototype.dropDatabase() no longer accepts a call | exception | error | dropdatabase, callbacks, migration, mongoose-7 |
| Connection.prototype.openUri() no longer accepts a callback | exception | error | connect, openuri, callbacks, migration, mongoose-7 |
| Connection.prototype.destroy() no longer accepts a callback | exception | error | destroy, connection-lifecycle, callbacks, migration, mongoose-7 |
| Connection.prototype.close() no longer accepts a callback | exception | error | close, connection-lifecycle, callbacks, migration, mongoose-7 |
| Connection#doClose unimplemented by driver | exception | error | driver, close, abstract-method, custom-driver |
| `connection.model()` should not be run with `new`. If you ar | validation | error | model, constructor-misuse, api-misuse |
| The 2nd parameter to `mongoose.model()` should be a schema o | validation | error | model, schema, invalid-argument-type, api-misuse |
| Cannot overwrite `${name}` model once compiled. | exception | error | model, overwrite, hot-reload, duplicate-definition |
| Schema hasn't been registered for model "${name}". Use mongo | exception | error | model, missing-schema, model-lookup, multi-connection |
| First parameter to `deleteModel()` must be a string or regex | validation | error | model, deletemodel, invalid-argument-type, api-misuse |
| Connection#setClient not implemented by driver | exception | error | driver, setclient, abstract-method, custom-driver |
| Connection#createClient not implemented by driver | exception | error | connection, custom-driver, openuri, mongoose |
| Mongoose does not support using async iterators with an exis | exception | error | aggregation, async-iterator, cursor, for-await, mongoose |
| AggregationCursor.prototype.close() no longer accepts a call | exception | error | aggregation-cursor, callback, promise, mongoose-7, migration |
| AggregationCursor.prototype.next() no longer accepts a callb | exception | error | aggregation-cursor, callback, promise, mongoose-7, migration |
| AggregationCursor.prototype.eachAsync() no longer accepts a | exception | error | aggregation-cursor, eachasync, callback, promise, mongoose-7, migration |
| Cannot create change stream with `hydrate: true` unless call | exception | error | change-stream, watch, hydrate, mongoose |
| Cannot call hasNext() on errored ChangeStream | exception | error | change-stream, hasnext, error-recovery, mongoose |
| Cannot call next() on errored ChangeStream | exception | error | change-stream, next, error-recovery, mongoose |
| Cannot call addListener() on errored ChangeStream | exception | error | change-stream, addlistener, error-recovery, mongoose |
| Cannot call on() on errored ChangeStream | exception | error | change-stream, event-listener, error-recovery, mongoose |
| Cannot call once() on errored ChangeStream | exception | error | change-stream, once, error-recovery, mongoose |
| QueryCursor.prototype.close() no longer accepts a callback | exception | error | query-cursor, callback, promise, mongoose-7, migration |
| QueryCursor.prototype.next() no longer accepts a callback | exception | error | query-cursor, callback, promise, mongoose-7, migration |
| Cannot call `next()` on a closed cursor | exception | error | query-cursor, cursor-lifecycle, close, mongoose |
| QueryCursor.prototype.eachAsync() no longer accepts a callba | exception | error | query-cursor, eachasync, callback, promise, mongoose-7, migration |
| The skipId parameter has been removed. Use { skipId: true } | exception | error | document, constructor, skipid, mongoose-6, migration |
| Parameter "obj" to Document() must be an object, got "${obj} | exception | error | document, constructor, type-validation, objectparametererror, mongoose |
| Parameter "doc" to init() must be an object, got "${doc}" (t | exception | error | document, init, hydration, objectparametererror, mongoose |
| Tried to set nested object field `${path}` to ${typeDescript | exception | error | document, hydration, schema-mismatch, objectexpectederror, data-migration, mongoose |
| Field `${path}` is not in schema and strictRead is set to th | exception | error | mongoose, strict-read, hydration, schema, strict-mode |
| Field `${i}` is not in schema and strict mode is set to thro | exception | error | mongoose, hydrate, strict-mode, schema |
| Document updateOne pre hooks cannot overwrite arguments | exception | error | mongoose, middleware, hooks, updateone, document |
| Cannot set a document's session to a session that has ended. | exception | error | mongoose, sessions, transactions, mongodb-driver |
| Field `${key}` is not in schema and strict mode is set to th | exception | error | mongoose, strict-mode, schema, set |
| Field `${path}` is not in schema and strict mode is set to t | exception | error | mongoose, strict-mode, schema, set, dotted-path |
| `refPath` must be a string or a function that returns a stri | exception | error | mongoose, refpath, populate, dynamic-refs, polymorphic |
| Invalid `path`. Must be either string or array. Got "${path} | exception | error | mongoose, internal-api, typeerror, path |
| Document.prototype.validate() no longer accepts a callback | exception | error | mongoose, callbacks, promises, migration, validate |
| Can't validate() the same doc multiple times in parallel. Do | exception | error | mongoose, validate, concurrency, parallel |
| Cannot set both `validateAllPaths` and `pathsToSkip` | exception | error | mongoose, validate, options, typeerror |
| Cannot set both `validateAllPaths` and `pathsToValidate` | exception | error | mongoose, validate, options, typeerror |
| Cannot set both `validateAllPaths` and `validateModifiedOnly | exception | error | mongoose, validate, options, typeerror |
| Cannot validate subdocument that does not have a parent | exception | error | mongoose, subdocuments, validate, parent-child |
| `transform` function must be synchronous, but the transform | exception | error | mongoose, tojson, transform, async, serialization |
| Document.prototype.populate() no longer accepts a callback | exception | error | mongoose, populate, callback-removed, async-await, migration |
| Expected path "${path}" to be populated | exception | error | mongoose, populate, assertion, unpopulated-path, subdocument |
| For your own good, using `document.save()` to update an arra | exception | error | mongoose, divergent-array, populate, projection, save, data-safety |
| Cannot call `${this.name}.${i}()` before initial connection | exception | error | mongoose, connection, buffercommands, startup, race-condition |
| No connections to database "${name}" found | exception | warning | mongoose, multi-tenant, usedb, removedb, connection |
| The `uri` parameter to `openUri()` must be a string, got "${ | exception | critical | mongoose, connection-string, env-var, configuration, startup |
| Connection has been closed and destroyed, and cannot be used | exception | error | mongoose, connection, destroy, lifecycle, restart |
| Can't call `openUri()` on an active connection with differen | exception | error | mongoose, connect, multiple-connections, hmr, testing |
| Must provide `autoEncryption` when connecting with encrypted | exception | critical | mongoose, csfle, queryable-encryption, autoencryption, security, mongodb |
| Cannot have duplicate keys in discriminators with encryption | exception | error | mongoose, discriminators, encryption, csfle, queryable-encryption, schema-design |
| Must call `setClient()` with an instance of MongoClient | exception | error | mongoose, setclient, mongodb-driver, instanceof, type-check |
| Cannot call `setClient()` on a connection that is already co | exception | error | mongoose, setclient, connection-state, lifecycle |
| Cannot call `setClient()` with a MongoClient that you have n | exception | error | mongoose, setclient, mongodb-driver, connect, await |
| a circular reference in the update value, updateValue: ${uti | exception | error | mongoose, update, circular-reference, serialization, bson |
| batchSize must be a number | exception | error | mongoose, cursor, eachasync, batch-size, typeerror, env-var |
| batchSize must be an integer | exception | error | mongoose, cursor, eachasync, batch-size, integer |
| batchSize must be at least 1 | exception | error | mongoose, cursor, eachasync, batch-size, bounds-check |
| Infinite subdocument loop: subdoc with _id ${doc._id} is a p | exception | error | mongoose, subdocument, circular-reference, save, infinite-loop |
| You have a method and a property in your schema both named " | exception | error | mongoose, schema, methods, name-collision, model-compile |
| Must provide a filter object. | exception | error | mongoose, bulkwrite, updateone, filter, validation |
| Must provide an update object. | exception | error | |
| encrypted fields cannot be declared on both the base schema | exception | error | |
| encrypted fields cannot have the same path as a non-encrypte | exception | error | |
| You must pass a valid discriminator Schema | exception | error | |
| Discriminator "${name}" can only be a discriminator of the r | exception | error | |
| Discriminator "${name}" cannot have field with name "${key}" | exception | error | |
| Can't set discriminator key "${key}" | exception | error | |
| Can't customize discriminator option ${_key} (can only modif | exception | error | |
| Discriminator with name "${name}" already exists | exception | error | |
| Limit must be positive | exception | error | |
| Cannot use $where filter with populate() match | exception | error | |
| `refPath` must be a string or a function that returns a stri | exception | error | |
| refPath `${refPath}` must not be excluded in projection, got | exception | error | |
| Can't populate individual element in an array | exception | error | |
| Could not normalize ref path, chunk ${chunk} not in populate | exception | error | |
| Invalid ref at path "${path}". Got ${util.inspect(ref, { dep | exception | error | |
| MongoDB prohibits index creation on connections that read fr | exception | error | |
| `$expr` must be an object or boolean literal | exception | error | |
| Invalid atomic update value for ${op}. Expected an object, r | exception | error | mongoose, update, query, validation |
| Invalid update pipeline operator: "${op}" | exception | error | mongoose, update, pipeline, unsupported-operator, aggregation |
| Field `${pathToCheck}` is not in schema and strict mode is s | exception | error | mongoose, update, strict-mode, schema, nested |
| Field `${prefix}${key}` is not in schema and strict mode is | exception | error | mongoose, update, strict-mode, schema, typo |
| Cast to number failed for value "${value}" (type ${valueType | exception | error | mongoose, update, cast-error, type-coercion, inc |
| Cast to number failed for value "${value}" (type ${valueType | exception | error | mongoose, update, cast-error, inc, null-handling |
| Field ${fullPath} is immutable and strict = 'throw' | exception | error | mongoose, immutable, strict-mode, update |
| ${key} is not allowed with sanitizeFilter | exception | error | mongoose, security, query-injection, sanitize-filter |
| Path `${path}` is immutable and strict mode is set to throw. | exception | error | mongoose, immutable, strict-mode, document, setters |
| Got null array filter in ${arrayFilters} | exception | error | mongoose, array-filters, update, validation |
| Could not find path "${filterPath}" in schema | exception | error | mongoose, array-filters, strict-query, schema, update |
| Path '${path}' contains the same array filter multiple times | exception | error | mongoose, array-filters, update, nested-arrays |
| 2nd argument to `Model` constructor must be a POJO or string | exception | error | mongoose, model, schema, constructor, api-misuse |
| First argument to `Model` constructor must be an object, **n | exception | error | mongoose, model, constructor, api-misuse |
| `useConnection()` requires a Mongoose connection. | exception | error | mongoose, connection, useconnection, type-mismatch |
| The connection passed to `useConnection()` has a different v | exception | error | mongoose, connection, version-conflict, duplicate-dependency, monorepo |
| document must have an _id before saving | exception | error | mongoose, save, id, insert, schema |
| Model.prototype.save() no longer accepts a callback | exception | error | mongoose, save, callback, promises, migration |
| No _id found on document! | exception | error | mongoose, delete, id, document |
| Model.prototype.deleteOne() no longer accepts a callback | exception | error | mongoose, delete, callback, promises, migration |
| Document deleteOne pre hooks cannot overwrite arguments | exception | error | mongoose, middleware, hooks, deleteone |
| Model.exists() no longer accepts a callback | exception | error | mongoose, exists, callback, promises, migration |
| The provided class ${name} must extend Model | exception | error | mongoose, discriminator, inheritance, model |
| Cannot overwrite `${name}` model once compiled. | exception | error | mongoose, discriminator, model-registry, duplicate-model, hot-reload |
| `Model.${fnName}()` cannot run without a model as `this`. Ma | exception | error | mongoose, this-context, unbound-function, statics |
| `Model.${fnName}()` cannot run without a model as `this`. Ma | exception | error | mongoose, this-context, new-misuse, statics |
| Model.init() no longer accepts a callback | exception | error | mongoose, callback-removed, promise, indexes, migration |
| Model.createCollection() no longer accepts a callback | exception | error | mongoose, callback-removed, promise, collection, migration |
| Model.syncIndexes() no longer accepts a callback | exception | error | mongoose, callback-removed, promise, indexes, migration |
| Model.cleanIndexes() no longer accepts a callback | exception | error | mongoose, callback-removed, promise, indexes, migration |
| Model.listIndexes() no longer accepts a callback | exception | error | mongoose, callback-removed, promise, indexes, migration |
| Model.ensureIndexes() no longer accepts a callback | exception | error | mongoose, callback-removed, promise, indexes, migration |
| Model.createIndexes() no longer accepts a callback | exception | error | mongoose, callback-removed, promise, indexes, migration |
| Provided object has both field "${name}" and its alias "${al | exception | error | mongoose, alias, translatealiases, conflicting-keys, query-options |
| Model.deleteMany() no longer accepts a callback | exception | error | mongoose, callback-removed, promise, delete, migration |
| Model.find() no longer accepts a callback | exception | error | mongoose, callback-removed, promise, query, migration |
| Model.findById() no longer accepts a callback | exception | error | mongoose, callback-removed, promise, query, migration |
| Model.findOne() no longer accepts a callback | exception | error | mongoose, callback-removed, promise, query, migration |
| Model.countDocuments() no longer accepts a callback | exception | error | mongoose, callback-removed, promise, count, migration |
| Model.distinct() no longer accepts a callback | exception | error | mongoose, callback-removed, promise, distinct, migration |
| Model.findOneAndUpdate() no longer accepts a callback | exception | error | mongoose, callback-removed, promise, query, update, migration |
| Model.findByIdAndUpdate() no longer accepts a callback | exception | error | mongoose, callback, promise, migration, api-change, findandmodify |
| Model.findOneAndDelete() no longer accepts a callback | exception | error | mongoose, callback, promise, migration, api-change, delete |
| Model.findByIdAndDelete() no longer accepts a callback | exception | error | mongoose, callback, promise, migration, api-change, delete |
| Model.findOneAndReplace() no longer accepts a callback | exception | error | mongoose, callback, promise, migration, api-change, replace |
| Model.create() no longer accepts a callback | exception | error | mongoose, callback, promise, migration, api-change, create |
| Cannot call `create()` with a session and multiple documents | exception | error | mongoose, transactions, session, ordered, create, mongodb |
| Discriminator "${doc[discriminatorKey]}" not found for model | exception | error | mongoose, discriminators, schema, create, polymorphism |
| Parameter "doc" to insertOne() must be an object, got "${doc | exception | error | mongoose, insertone, type-validation, invalid-argument, json-parse |
| Model.insertMany() no longer accepts a callback | exception | error | mongoose, callback, promise, migration, insertmany, bulk |
| insertMany failed with ${validationErrors.length} Mongoose v | exception | error | mongoose, validation, insertmany, bulk, throwonvalidationerror |
| Model.bulkWrite() no longer accepts a callback | exception | error | mongoose, callback, promise, migration, bulkwrite, bulk |
| bulkWrite failed with ${validationErrors.length} Mongoose va | exception | error | mongoose, bulkwrite, validation, bulk, casting |
| ${operation} failed with ${validationErrors.length} Mongoose | exception | error | mongoose, bulkwrite, validation, partial-success, bulk |
| ${modelName}.bulkSave() was not able to update ${numDocument | exception | error | mongoose, bulksave, versioning, optimistic-concurrency, conflict, bulk |
| Cannot overwrite options in pre("save") hook on bulkSave() | exception | error | |
| bulkSave expects an array of documents to be passed, receive | exception | error | |
| documents.${i} was not a mongoose document, documents must b | exception | error | |
| Cannot set `hydratedPopulatedDocs` option to false if `virtu | exception | error | |
| updateMany `update` parameter cannot be nullish | exception | error | |
| Model.aggregate() no longer accepts a callback | exception | error | |
| Model.validate() no longer accepts a callback | exception | error | |
| Model.populate() no longer accepts a callback | exception | error | |
| The mongodb driver must be used to obtain a ClientEncryption | exception | error | |
| Cannot modify Mongoose driver if a connection is already ope | exception | error | |
| Cannot set `returnOriginal` when `returnDocument` is already | exception | error | |
| Cannot set `returnDocument` when `returnOriginal` is already | exception | error | |
| Mongoose.prototype.connect() no longer accepts a callback | exception | error | |
| Mongoose.prototype.disconnect() no longer accepts a callback | exception | error | |
| Can not use `limit` and `perDocumentLimit` at the same time. | exception | error | |
| Empty or invalid filter not allowed with requireFilter enabl | exception | error | |
| Parameter "filter" to ${this.op}() must be an object, got "$ | exception | error | |
| Cast to Number failed for value ${stringValue} (type ${value | exception | error | |
| Cast to Number failed for value ${stringValue} (type ${value | exception | error | |
| Invalid select: select only takes 1 argument | exception | error | |
| Invalid select() argument. Must be string or object. | exception | error | mongoose, query, projection, select, typeerror, invalid-argument |
| Options must be an object, got "${options}" | exception | error | mongoose, query, setoptions, options, invalid-argument |
| Query.prototype.find() no longer accepts a callback | exception | error | mongoose, callback, promise, migration, breaking-change, find |
| Query.prototype.findOne() no longer accepts a callback | exception | error | mongoose, callback, promise, migration, breaking-change, findone |
| Query.prototype.estimatedDocumentCount() no longer accepts a | exception | error | mongoose, callback, promise, migration, breaking-change, count |
| Query.prototype.countDocuments() no longer accepts a callbac | exception | error | mongoose, callback, promise, migration, breaking-change, count |
| Query.prototype.distinct() no longer accepts a callback | exception | error | mongoose, callback, promise, migration, breaking-change, distinct |
| sort() takes at most 2 arguments | exception | error | mongoose, query, sort, invalid-argument, arity |
| sort() options argument must be an object or nullish | exception | error | mongoose, query, sort, options, invalid-argument |
| Invalid sort() argument, must be array of arrays | exception | error | mongoose, query, sort, typeerror, invalid-argument |
| Invalid sort() argument. Must be a string, object, array, or | exception | error | mongoose, query, sort, typeerror, invalid-argument |
| Invalid sort value: { ${key}: ${val} } | exception | error | mongoose, query, sort, typeerror, invalid-value, request-params |
| Query.prototype.deleteOne() no longer accepts a callback | exception | error | mongoose, callback, promise, migration, breaking-change, delete |
| Query.prototype.deleteMany() no longer accepts a callback | exception | error | mongoose, callback, promise, migration, breaking-change, delete |
| Query.prototype.findOneAndUpdate() no longer accepts a callb | exception | error | mongoose, callback, promise, migration, breaking-change, findoneandupdate |
| Cannot pass an array to query updates unless the `updatePipe | exception | error | mongoose, query, findoneandupdate, aggregation-pipeline, update, options |
| Query.prototype.findOneAndDelete() no longer accepts a callb | exception | error | mongoose, callback, promise, migration, breaking-change, delete |
| Query.prototype.findOneAndReplace() no longer accepts a call | exception | error | mongoose, callback, promise, migration, breaking-change, replace |
| Cannot mix array and object updates (current: ${_previewUpda | exception | error | mongoose, query, update-pipeline, invalid-argument |
| Cannot mix array and object updates (current: ${_previewUpda | exception | error | mongoose, query, update-pipeline, invalid-argument |
| Query.prototype.validate() no longer accepts a callback | exception | error | mongoose, callback-removed, migration, promise |
| Query.prototype.exec() no longer accepts a callback | exception | error | mongoose, callback-removed, migration, promise |
| Query must have `op` before executing | exception | error | mongoose, query, exec, api-misuse |
| Query must have an associated model before executing | exception | error | mongoose, query, exec, model-binding |
| Query has invalid `op`: "${this.op}" | exception | error | mongoose, query, exec, invalid-op |
| Invalid field "" passed to sort() | exception | error | mongoose, sort, query, user-input |
| Query was already executed: ${str} | exception | error | mongoose, query-reuse, exec, migration |
| invalid argument | exception | error | mongoose, geospatial, near, invalid-argument, typeerror |
| Invalid value for alias option on ${prop}, got ${a} | exception | error | mongoose, schema, alias, invalid-argument |
| Invalid value for alias option on ${prop}, got ${alias} | exception | error | mongoose, schema, alias, invalid-argument |
| Schema#pick() only accepts an array argument, got "${typeof | exception | error | mongoose, schema, pick, invalid-argument |
| Path `${path}` is not in the schema | exception | error | mongoose, schema, pick, unknown-path |
| Schema#omit() only accepts an array argument, got "${typeof | exception | error | |
| `versionKey` must be falsy or string, got `${typeof options. | exception | error | |
| Must set `versionKey` if using `optimisticConcurrency` | exception | error | |
| invalid `encryptionType`: ${encryptionType} | exception | error | |
| Invalid value for schema path `${fullPath}`, got value "${va | exception | error | |
| Invalid schema configuration: `${val}` is not a valid type a | exception | error | |
| Invalid value for schema Array path `${fullPath}`, got value | exception | error | |
| encryptionType of a nested schema must match the encryption | exception | error | |
| encryptionType must be provided | exception | error | |
| Invalid BSON type for FLE field: '${path}' | exception | error | |
| removeIndex() takes only 1 argument | exception | error | |
| removeIndex() may only take either an object or a string as | exception | error | |
| Cannot set special property `${last}` on a schema | exception | error | |
| Cannot set special property `${sub}` on a schema | exception | error | |
| Cannot set nested path `${path}`. Parent path `${fullPath}` | exception | error | |
| Schema for array path `${path}` is from a different copy of | exception | error | |
| Invalid schema configuration: Could not determine the embedd | exception | error | |
| Invalid schema configuration: `${path}` schematype definitio | exception | error | |
| Invalid schema configuration: `${name}` is not a valid type | exception | error | schema, type-resolution, configuration, circular-imports |
| First param to `schema.plugin()` must be a function, got "${ | exception | error | plugins, imports, api-misuse |
| Cannot overwrite Schema.indexTypes | exception | error | read-only, static-api, monkey-patching |
| Reference virtuals require `localField` option | exception | error | virtuals, populate, schema-definition, missing-option |
| Reference virtuals require `foreignField` option | exception | error | virtuals, populate, schema-definition, missing-option |
| Virtual path "${name}" conflicts with a real path in the sch | exception | error | virtuals, path-conflict, schema-definition |
| Path "${path}" is not an array | exception | error | virtuals, apply-to-array, arrays, schema-definition |
| Attempting to remove virtual "${virtual}" that does not exis | exception | error | virtuals, cleanup, api-misuse |
| `enum` can only be set on an array of strings or numbers , n | exception | error | enum, arrays, validators, schema-definition |
| Cast to [${e.kind}] failed for value "${value}" (type ${valu | exception | error | cast-error, arrays, input-validation, save |
| Cast to Array failed for value "${value}" (type ${valueType} | exception | error | cast-error, arrays, input-shape, save |
| You can only add an embedded discriminator on a document arr | exception | error | discriminators, arrays, embedded-documents, schema-definition |
| Can't use ${$conditional} with Array. | exception | error | query, operators, arrays, cast-error |
| Cannot set populate virtual as a property of an array | exception | error | virtuals, populate, arrays, schema-definition |
| conditional ${op} requires an array | exception | error | query, logical-operators, type-mismatch, arrays |
| Cast to BigInt failed for value "${value}" (type ${valueType | exception | error | cast-error, bigint, json, input-validation |
| Cast to Boolean failed for value "${value}" (type ${valueTyp | exception | error | cast-error, boolean, form-data, input-validation |
| Cast to Buffer failed for value "${value}" (type ${valueType | exception | error | cast-error, buffer, bson, driver-compat |
| Can't use ${$conditional} with Buffer. | exception | error | mongoose, buffer, query, operator, filter |
| Cast to date failed for value "${value}" (type ${valueType}) | exception | error | mongoose, date, cast, validation, date-parsing |
| Can't use ${$conditional} with Date. | exception | error | mongoose, date, query, operator, filter |
| Cast to Decimal128 failed for value "${value}" (type ${value | exception | error | mongoose, decimal128, cast, validation, money |
| Cannot create use schema for property "${key}" because the s | exception | error | mongoose, schema, timeseries, embedded-document, invalid-option |
| Cast to DocumentArray failed for value "${value}" (type ${va | exception | error | mongoose, document-array, cast, castnonarrays, schema-option |
| Cast to embedded failed for value "${value}" (type ${valueTy | exception | error | mongoose, embedded-document, document-array, cast, subdocument |
| Cannot create DocumentArrayElement schematype without a pare | exception | error | mongoose, internal, schematype, plugin, compatibility |
| Cast to Double failed for value "${value}" (type ${valueType | exception | error | mongoose, double, cast, validation, bson |
| Cast to Int32 failed for value "${value}" (type ${valueType} | exception | error | mongoose, int32, cast, integer-overflow, validation |
| Cannot use schema-level projections (`select: true` or `sele | exception | error | mongoose, map, schema, projection, select |
| Cast to Number failed for value "${value}" (type ${valueType | validation | error | mongoose, number, cast, validation, coercion |
| Can't use ${conditional} with Number. | exception | error | mongoose, number, query, operator, filter |
| Cast to ObjectId failed for value "${value}" (type ${valueTy | validation | error | mongoose, objectid, cast, validation, route-params |
| Cast to number failed for value "${value}" (type ${valueType | validation | error | mongoose, bitwise, query, operator, cast |
| $near must be either an array or an object with a $geometry | exception | error | mongoose, geospatial, near, geojson, query |
| Invalid $within $box argument. Expected an array, received $ | exception | error | mongoose, geospatial, within, box, query |
| Cast to $text failed for value "${value}" (type ${valueType} | validation | error | mongoose, text-search, full-text, query, cast |
| Cast to string failed for value "${value}" (type ${valueType | validation | error | mongoose, cast, string, schema, query |
| Can't use ${conditional} with String. | exception | error | mongoose, query, operators, string, castforquery |
| Cannot create use schema for property "${path}" because the | exception | error | mongoose, schema, timeseries, mongodb, subdocument |
| Tried to set nested object field `${path}` to ${typeDescript | exception | error | mongoose, subdocument, cast, assignment, schema |
| Can't use ${conditional} | exception | error | mongoose, subdocument, query, operators |
| Cast to Embedded failed for value "${value}" (type ${valueTy | validation | error | mongoose, subdocument, cast, query, casterror |
| Union schema type requires an array of types | exception | error | mongoose, schema, union, types, validation |
| Cast to UUID failed for value "${value}" (type ${valueType}) | validation | error | mongoose, uuid, cast, schema, casterror |
| Can't use ${conditional} with UUID. | exception | error | mongoose, uuid, query, operators |
| Path "${this.path}" may not have `index` set to false and `u | exception | error | mongoose, schema, index, unique, options |
| Path "${this.path}" may not have `index` set to false and `s | exception | error | mongoose, schema, index, sparse, options |
| Base SchemaType class does not implement a `cast()` function | exception | error | mongoose, schematype, custom-types, cast, subclassing |
| Cannot set default value of path `${this.path}` to a mongoos | exception | error | mongoose, schema, default, subdocument, options |
| Path "${this.path}" may not have `index` set to false and `t | exception | error | mongoose, schema, index, text-search, options |
| A setter must be a function. | exception | error | mongoose, schema, setter, typeerror, validation |
| A getter must be a function. | exception | error | mongoose, schema, getter, typeerror, validation |
| Invalid validator. Received (${typeof arg}) ${arg}. See http | exception | error | mongoose, schema, custom-validator, validate |
| Path "${this.path}" may not have `allowNull` specified when | exception | error | mongoose, schema, required, allownull, schema-options |
| Cast to ${this.instance} failed for value "${value}" (type $ | validation | error | mongoose, populate, cast-error, reference |
| Can't use ${conditional} | exception | error | mongoose, query, operators, cast-for-query |
| Converting unsupported SchemaType to JSON Schema: ${this.ins | exception | error | mongoose, json-schema, mixed, schema-introspection |
| No populated model found for path `${this[arrayPathSymbol]}` | exception | error | mongoose, populate, array, internal-bug |
| Mongoose does not support calling populate() on nested docs. | exception | error | mongoose, populate, array-subdocument |
| For your own good, Mongoose does not know how to remove an A | exception | error | mongoose, subdocument, deleteone, array, missing-id |
| Cannot convert a Buffer with subtype ${this._subtype} to a U | exception | error | mongoose, buffer, uuid, bson |
| Invalid subtype. Expected a number | exception | error | mongoose, buffer, subtype, typeerror, bson |
| Cannot manually populate single nested subdoc underneath Map | exception | error | mongoose, map, populate, single-nested |
| Mongoose maps only support string keys, got ${keyType} | exception | error | mongoose, map, keys, typeerror |
| Mongoose maps do not support keys that start with "$", got " | exception | error | mongoose, map, keys, sanitization |
| Mongoose maps do not support keys that contain ".", got "${k | exception | error | mongoose, map, keys, dotted-path |
| Mongoose maps do not support reserved key name "${key}" | exception | error | mongoose, map, keys, prototype-pollution, security |
| Infinite subdocument loop: subdoc with _id ${parent._id} is | exception | error | mongoose, subdocument, cycle, infinite-loop |
| Mongoose does not support calling populate() on nested docs. | exception | error | mongoose, populate, subdocument, single-nested |
| Collection name must be a string | exception | error | mongoose, model, collection-name, typeerror |
| Collection name cannot be empty | exception | error | |
| utils.populate: invalid path. Expected string or array of st | exception | error | |
| `error` must be `instanceof Error`. | exception | error | |
MONGOOSE `${firstPieceOfPath}` is a reserved schema pathname and may break some functiona | console | error | |
MONGOOSE Mongoose: `Document.prototype.validateSync()` is deprecated and will be removed | console | error | |
MONGOOSE mongoose: the method name "${method}" is used by mongoose internally, overwritin | console | error | |
MONGOOSE Mongoose: looks like you're trying to test a Mongoose app with Jest's default js | console | error | |
MONGOOSE mongoose: Cannot specify a custom index on `_id` for model name "${model.modelNa | console | error | |
MONGOOSE Mongoose: the `returnOriginal` option for `mongoose.set()` is deprecated. Use `m | console | error | |
MONGOOSE mongoose: the `new` option for `findOneAndUpdate()` and `findOneAndReplace()` is | console | error | |
MONGOOSE mongoose: To create a new ObjectId please try `Mongoose.Types.ObjectId` instead | console | error | |
MONGOOSE mongoose: calling `save()` on a subdoc does **not** save the document to MongoDB | console | error |