Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MongoBulkWriteError

An error indicating an unsuccessful Bulk Write

Hierarchy

Index

Constructors

constructor

Properties

[kErrorLabels]

[kErrorLabels]: Set<string>
internal

Optional code

code: string | number

This is a number in MongoServerError and a string in MongoDriverError

privateremarks

Define the type override on the subclasses when we can use the override keyword

Optional codeName

codeName: string

Optional err

Optional errInfo

errInfo: Document

message

message: string

Optional ok

ok: number

result

Optional stack

stack: string

Optional topologyVersion

topologyVersion: TopologyVersion

Optional writeConcernError

writeConcernError: Document

writeErrors

writeErrors: OneOrMore<WriteError> = []

Static stackTraceLimit

stackTraceLimit: number

Accessors

deletedCount

  • get deletedCount(): number

errmsg

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

    Returns string

errorLabels

  • get errorLabels(): string[]

insertedCount

  • get insertedCount(): number

insertedIds

  • get insertedIds(): {}
  • Inserted document generated Id's, hash key is the index of the originating operation

    Returns {}

    • [key: number]: any

matchedCount

  • get matchedCount(): number

modifiedCount

  • get modifiedCount(): number

name

  • get name(): string

upsertedCount

  • get upsertedCount(): number

upsertedIds

  • get upsertedIds(): {}
  • Upserted document generated Id's, hash key is the index of the originating operation

    Returns {}

    • [key: number]: any

Methods

addErrorLabel

  • addErrorLabel(label: string): void

hasErrorLabel

  • hasErrorLabel(label: string): boolean
  • 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

Static captureStackTrace

  • captureStackTrace(targetObject: object, constructorOpt?: Function): void
  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Static Optional prepareStackTrace

  • prepareStackTrace(err: Error, stackTraces: CallSite[]): any

Generated using TypeDoc