I\'m a little confused reading the Mongoose documentation.
If I run a query in mongoose which matches no documents in the collection, what are the values of err>
err>
If conditions were valid but no matches were found:
find: err is null, result is []
find
err
null
result
[]
findOne and findById: err is null, result is null
findOne
findById
However, if some condition was invalid (e.g. field is string but you pass an object, or you pass an invalid _id)
string
object
_id
For all three: err is {..}, result is undefined
{..}
undefined