MongoDB: db.getPrevError() method
db.getPrevError
The db.getPrevError() method is used to return a status document containing all errors since the last error reset.
Syntax:
db.getPrevError()
Example: MongoDB: db.getPrevError() method
The following statement will return the status document containing all errors since the last error reset.
db.getPrevError();
Output:
> db.getPrevError(); { "err" : null, "n" : 0, "nPrev" : -1, "ok" : 1 }
Retrieve the restaurants data from here
Previous:
db.getName() method
Next:
db.getProfilingStatus() method
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://w3resource.com/mongodb/shell-methods/database/db-getPrevError.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics