MongoDB Driver API for Node.js (original) (raw)

Class: WriteError

WriteError

An error that occurred during a BulkWrite on the server.

new WriteError()

lib/bulk/common.js, line 342

Create a new WriteError instance

NOTE: Internal Type, do not instantiate directly

Members

codenumber

WriteError code.

errmsgstring

WriteError message.

indexnumber

WriteError original bulk operation index.

Methods

getOperation(){object}

lib/bulk/common.js, line 380

Returns the underlying operation that caused the error

toJSON(){object}

lib/bulk/common.js, line 387

toString(){string}

lib/bulk/common.js, line 394