Internal
Should not be instantiated by the user.
Readonly
detailedA list of errors 1:1 with the number of errorful API requests made to the server. Each element contains the original command, the raw response, and the error descriptors for that request.
For operations that only make one request, this will be a singleton list (i.e. insertOne
).
Readonly
errorA list of error descriptors representing the individual errors returned by the API.
This is always equal to detailedErrorDescriptors.flatMap(d => d.errorDescriptors)
, for the user's
convenience.
Readonly
messageA human-readable message describing the first error.
This is always equal to errorDescriptors[0]?.message
if it exists, otherwise it's given a generic
default message.
Optional
stackStatic
Optional
prepareOptional override for formatting stack traces
Static
stackStatic
capture
An error representing the complete errors for an operation. This is a cohesive error that represents all the errors that occurred during a single operation, and should not be thought of as always 1:1 with the number of API requests—rather it's 1:1 with the number of logical operations performed by the user (i.e. the methods on the Collection class).
This is not used for "hard" (4XX, 5XX) errors, which are rarer and would be thrown directly by the underlying code.
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.