Internal
Should not be instantiated by the user.
Private
Readonly
#causesPrivate
Readonly
#partialThe name of the error. This is always 'InsertManyError'.
Optional
stackStatic
Optional
prepareOptional override for formatting stack traces
Static
stackStatic
capture
Overview
Represents an error that occurred during an
insertMany
operation (which may be paginated).Contains the inserted IDs of the documents that were successfully inserted, as well as the cumulative errors that occurred during the operation.
If the operation was ordered, the
insertedIds
will be in the same order as the documents that were attempted to be inserted.Example
Collections vs Tables
There is a sister TableInsertManyError class that is used for
insertMany
operations on tables. It's identical in structure, but just uses the appropriate TableInsertManyResult type.Field
message - A human-readable message describing the first error
Field
errorDescriptors - A list of error descriptors representing the individual errors returned by the API
Field
detailedErrorDescriptors - A list of errors 1:1 with the number of errorful API requests made to the server.
Field
partialResult - The partial result of the
InsertMany
operation that was performed