Class MongoBatchReExecutionError

An error generated when a batch command is re-executed after one of the commands in the batch has failed



  • Do not use this constructor!

    Meant for internal use only.


    • message: string = 'This batch has already been executed, create new batch to execute'

    Returns MongoBatchReExecutionError


    This class is only meant to be constructed within the driver. This constructor is not subject to semantic versioning compatibility guarantees and may change at any time.


cause?: Error
code?: string | number

This is a number in MongoServerError and a string in MongoDriverError

connectionGeneration?: number
message: string
stack?: string
topologyVersion?: TopologyVersion
prepareStackTrace?: ((err, stackTraces) => any)

Type declaration

stackTraceLimit: number


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

    Returns string

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

  • get name(): string
  • Returns string


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


    • 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


    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc