node-mongodb-fixtures icon indicating copy to clipboard operation
node-mongodb-fixtures copied to clipboard

Invalid document id results in misleading error

Open InfinitySamurai opened this issue 4 years ago • 0 comments

Hey guys,

Ran into a confusing error today. I was accidentally trying to insert a document with an invalid ObjectId (1 character too short) and the error message I received as output was:

[error] no docs returned from file: "LendingFiles.ts". verify that a docs array was exported. note: if using .js files, use "module.exports", instead of "exports".

Took me a long time to pin down that there was a particular fixture that was failing the whole thing because of my bad ObjectId

InfinitySamurai avatar Feb 03 '21 00:02 InfinitySamurai