Hello everybody,
I have a problem with error recovery during ‘findOne’ on a Mongo basis.
This works
let lm =collection.findOne({_id:idDoc})
console.log(lm)
This does not work
let lm =collection.findOne({_id:idDoc},function(err,result){
if(err){}
if(result){}
});
console.log(lm)
next runtime error
Exception from Tracker afterFlush function:
Error: Match error: Failed Match.OneOf, Match.Maybe or Match.Optional validation
at check (match.js:36)
at Collection._getFindOptions (collection.js:295)
at Collection.findOne (collection.js:358)
at collectionTest (dbFunctions.js:31)
at Blaze.TemplateInstance.Template.BQESAIECR.rendered (lesbanquesSaiEcr.js:12)
at template.js:119
at Function.Template._withTemplateInstanceFunc (template.js:490)
at fireCallbacks (template.js:115)
at Blaze.View. (template.js:208)
at view.js:107
I can’t find where this error comes from.
can someone tell me which direction i should look to solve this problem.
Thank you for your answers.
YC