[beta] Test fails in Perform New Updates on a Document Using model.findOneAndUpdate()
See original GitHub issueChallenge Name
Issue Description
The test does not pass. The glitch logs:
11:38 AM
process.nextTick(function() { throw err; });
11:38 AM
^
11:38 AM
11:38 AM
ReferenceError: data is not defined
11:38 AM
Jump to
at /app/server.js:197:11
Fix: in server.js
line 197 move the statement
if(!data) {
console.log('Missing `done()` argument');
return next({message: 'Missing callback argument'});
}
in try {}
after if(err) { return next(err) }
Browser Information
- Browser Name, Version: Chrome, 62.0.3202.94
- Operating System: Win 10
- Mobile, Desktop, or Tablet: Desktop
Your Code
Screenshot
Issue Analytics
- State:
- Created 6 years ago
- Comments:17 (14 by maintainers)
Top Results From Across the Web
Perform New Updates on a Document Using model ...
It seems there is a bug in the testing. It updates and returns in updated record in the console. However, it does not...
Read more >09 - Perform New Updates Using model.findOneAndUpdate
Mongoose has some methods findOneAndUpdate() and findByIdAndUpdate() that allow us to update records in one step.
Read more >Perform New Updates on a Document Using Model ... - YouTube
In this MongoDB and Mongoose tutorial we perform new updates on a document using Model. findOneAndUpdate. This is one section of many in ......
Read more >FreeCodeCamp/HelpBackEnd - Gitter
Perform New Updates on a Document Using model.findOneAndUpdate() Recent versions of mongoose have methods to simplify documents updating.
Read more >Mongoose.findOneAndUpdate() is not creating new document
The mongoose.findOneAndUpdate() method isn't creating new object when a new WEEKNUM is provided by the client. Instead it just updates the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@raisedadead - Is this still open? If so, I can resolve it.
Thanks @Em-Ant I’ll try and QA this ASAP