-
Type: Improvement
-
Resolution: Done
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
The error message Invalid modifier specified: $set, at a first glance, suggests that '$set' itself is an invalid modifier. I'm not the only one to read it that way; see also this StackOverflow comment.
This happens when (accidentally) running an update() with {$set: null}.
The message would be less misleading and more useful if it output the precise value of the modifier (not just $set). For example:
Invalid modifier specified for $set: null