Class: MongoWriteConcernError

MongoWriteConcernError

An error thrown when the server reports a writeConcernError

new MongoWriteConcernError(message, result)

Name Type Description
message Error | string | object

The error message

result object

The result document (provided if ok: 1)

Properties:
Name Type Argument Description
message string

The error message

result object <optional>

The result document (provided if ok: 1)

Extends

Methods

inherited hasErrorLabel(label){boolean}

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