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

Class: MongoError

MongoError

Creates a new MongoError

new MongoError(message)

Name Type Description
message Error|string object
Properties:
Name Type Description
message string The error message
stack string The error call stack

Extends

Members

errmsg

Legacy name for server error responses

Methods

Creates a new MongoError object

Name Type Description
options Error|string object

Deprecated

Returns:

MongoError instance

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