Caused by trying to perform an operation on an already-initialized FindCursor that requires it to be
uninitialized.
If you run into this error, and you really do need to change an option on the cursor, you can rewind the cursor
using FindCursor.rewind, or clone it using FindCursor.clone.
Example
awaitcollection.find({}).toArray();
try { awaitcursor.limit(10); } catch (e) { if (einstanceofCursorAlreadyInitializedError) { console.log(e.message); // "Cursor is already initialized..." } }
Caused by trying to perform an operation on an already-initialized FindCursor that requires it to be uninitialized.
If you run into this error, and you really do need to change an option on the cursor, you can rewind the cursor using FindCursor.rewind, or clone it using FindCursor.clone.
Example