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

Class: MongoWriteConcernError

MongoWriteConcernError

An error thrown when the server reports a writeConcernError

new MongoWriteConcernError(message, result)

Name Type Description
message Error|string object
result object The result document (provided if ok: 1)
Properties:
Name Type Argument Description
message string The error message
result object The result document (provided if ok: 1)

Extends

Members

errmsg

Legacy name for server error responses

Methods

Checks the error to see if it has an error label

Name Type Description
label string The error label to check for
Returns:

true if the error has the provided error label