Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MongoBulkWriteError

An error indicating an unsuccessful Bulk Write

Hierarchy

Index

Constructors

Properties

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

codeName?: string
errInfo?: Document
message: string
ok?: number
stack?: string
topologyVersion?: TopologyVersion
writeConcernError?: Document
writeErrors: OneOrMore<WriteError> = []
prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

Optional override for formatting stack traces

Type declaration

stackTraceLimit: number

Accessors

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

    Returns string

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

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

    Returns {}

    • [key: number]: any
  • get matchedCount(): number
  • get modifiedCount(): number
  • get name(): string
  • get upsertedCount(): number
  • get upsertedIds(): {}
  • Upserted document generated Id's, hash key is the index of the originating operation

    Returns {}

    • [key: number]: any

Methods

  • addErrorLabel(label: string): void
  • 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

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

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc