Class MongoClientBulkWriteError

An error indicating that an error occurred when executing the bulk write.

Hierarchy (view full)

Constructors

Properties

cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

codeName?: string
connectionGeneration?: number
errInfo?: Document
errorResponse: ErrorDescription

Raw error result document returned by server.

message: string
ok?: number
partialResult?: ClientBulkWriteResult

The results of any successful operations that were performed before the error was encountered.

stack?: string
topologyVersion?: TopologyVersion
writeConcernError?: Document
writeConcernErrors: Document[]

Write concern errors that occurred while executing the bulk write. This list may have multiple items if more than one server command was required to execute the bulk write.

writeErrors: Map<number, ClientBulkWriteError>

Errors that occurred during the execution of individual write operations. This map will contain at most one entry if the bulk write was ordered.

prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Optional override for formatting stack traces

stackTraceLimit: number

Accessors

  • get errmsg(): string
  • Legacy name for server error responses

    Returns string

  • get errorLabels(): string[]
  • Returns string[]

  • get name(): string
  • Returns string

Methods

  • Checks the error to see if it has an error label

    Parameters

    • label: string

      The error label to check for

    Returns boolean

    returns true if the error has the provided error label

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void