-
Type: Bug
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: 4.0.0
-
Component/s: Shell
-
None
-
Empty show more show less
According to the CRUD spec, insertMany throws when it is called with an empty array.
The error thrown by the driver is a TypeError with message Invalid Operation, no operations specified.
That might confuse users. I wonder if it should be spelled out that this error means that "there are no operations specified in the batch" or that "batch cannot be empty".
We were looking at this from the perspective of a shell user who sees this error perhaps generated during the execution of a script but I think making the message clearer could be beneficial for most users.