You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/Users/indra/server/article-node/node_modules/mongoose/lib/document.js:86
throw new ObjectParameterError(obj, 'obj', 'Document');
^
ObjectParameterError: Parameter "obj" to Document() must be an object, got url
at new ObjectParameterError (/Users/indra/server/article-node/node_modules/mongoose/lib/error/objectParameter.js:25:11)
at model.Document (/Users/indra/server/article-node/node_modules/mongoose/lib/document.js:86:11)
at model.Model (/Users/indra/server/article-node/node_modules/mongoose/lib/model.js:97:12)
at new model (/Users/indra/server/article-node/node_modules/mongoose/lib/model.js:4425:15)
at Array.<anonymous> (/Users/indra/server/article-node/node_modules/mongoose/lib/model.js:3212:15)
at _start (/Users/indra/server/article-node/node_modules/mongoose/lib/helpers/parallelLimit.js:27:37)
at parallelLimit (/Users/indra/server/article-node/node_modules/mongoose/lib/helpers/parallelLimit.js:23:5)
at Function.Model.$__insertMany (/Users/indra/server/article-node/node_modules/mongoose/lib/model.js:3233:3)
at process.nextTick (/Users/indra/server/article-node/node_modules/kareem/index.js:369:33)
at process._tickCallback (internal/process/next_tick.js:61:11)
[nodemon] app crashed - waiting for file changes before starting...
What is the expected behavior?
Insert data format error will cause the node process to CRASH AND Unable to catch()
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
node 10.15.0
Mongosse 5.7.12
MongoDB 4.0.12
The text was updated successfully, but these errors were encountered:
Fonger
added a commit
to Fonger/mongoose
that referenced
this issue
Nov 20, 2019
Do you want to request a feature or report a bug?
Report Bug
What is the current behavior?
insertMany()
If the current behavior is a bug, please provide the steps to reproduce.
schema: web_image.js
controller:
route:
router.post('/add', WebImageController.Web_Image_Add)
post body RIGHT:
post body WRONG:
What is the expected behavior?
Insert data format error will cause the node process to CRASH
AND Unable to catch()
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
node 10.15.0
Mongosse 5.7.12
MongoDB 4.0.12
The text was updated successfully, but these errors were encountered: