node-mongo-seeds: Fix { [MongoError: Invalid Operation, No operations in bulk] name: 'MongoError' }
Depending on what you’re inserting, you can the error: { [MongoError: Invalid Operation, No operations in bulk] name: 'MongoError' }
Need to figure out what is causing this and how to fix it.
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 17 (9 by maintainers)
Commits related to this issue
- Fixed issue with inserting empty arrays. Fixes #6 — committed to toymachiner62/node-mongo-seeds by toymachiner62 9 years ago
- Fixed issue with inserting empty arrays. Fixes #6 — committed to toymachiner62/node-mongo-seeds by toymachiner62 9 years ago
- Fixed issue with inserting empty arrays. Fixes #6 — committed to toymachiner62/node-mongo-seeds by toymachiner62 9 years ago
- Fix invalid bulk operation from MongoDB when adding empty array Currently we allow for empty arrays to be added to the queue, apparently MongoDB is a bit sensitive about that and throws an error. Th... — committed to aidenkeating/fh-mbaas-api by deleted user 7 years ago
- Fix invalid bulk operation from MongoDB when adding empty array Currently we allow for empty arrays to be added to the queue, apparently MongoDB is a bit sensitive about that and throws an error. Th... — committed to aidenkeating/fh-mbaas-api by deleted user 7 years ago
- Fix invalid bulk operation from MongoDB when adding empty array Currently we allow for empty arrays to be added to the queue, apparently MongoDB is a bit sensitive about that and throws an error. Th... — committed to aidenkeating/fh-mbaas-api by deleted user 7 years ago
- Fix invalid bulk operation from MongoDB when adding empty array Currently we allow for empty arrays to be added to the queue, apparently MongoDB is a bit sensitive about that and throws an error. Th... — committed to aidenkeating/fh-mbaas-api by deleted user 7 years ago
- Fix invalid bulk operation from MongoDB when adding empty array Currently we allow for empty arrays to be added to the queue, apparently MongoDB is a bit sensitive about that and throws an error. Th... — committed to aidenkeating/fh-mbaas-api by deleted user 7 years ago
- Fix invalid bulk operation from MongoDB when adding empty array Currently we allow for empty arrays to be added to the queue, apparently MongoDB is a bit sensitive about that and throws an error. Th... — committed to feedhenry/fh-mbaas-api by deleted user 7 years ago
I just found out this error may happen if an empty array is passed. I could swear I’m not sending empty arrays, but I’ll do some tests to verify.
Just check if the bulk instance has operations before calling
execute
with this function: