In conjunction with NODE-6708, we could use the toJSON() method to throw a better exception when a user attempts to serialize a cursor with JSON.stringify(), EJSON.stringify() and friends, pointing them at the fact that they likely want to call .toArray() first.
We can do this independently of NODE-6708 and only test it with JSON.stringify() until that ticket has been addressed.
- related to
-
NODE-6708 EJSON circular reference detection fails to account for .toJSON()
-
- Backlog
-