Options
All
  • Public
  • Public/Protected
  • All
Menu
privateremarks

mongodb-client-encryption has a dependency on this error, it uses the constructor with a string argument

Hierarchy

Index

Methods

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

    Parameters

    Returns 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

  • addErrorLabel(label: string): void
  • Parameters

    • label: string

    Returns void

Properties

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

Type declaration

stackTraceLimit: number
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

topologyVersion?: TopologyVersion
connectionGeneration?: number
cause?: Error
message: string
stack?: string

Constructors

  • new MongoError(message: string | Error): MongoError
  • Parameters

    • message: string | Error

    Returns MongoError

Accessors

  • get name(): string
  • Returns string

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

    Returns string

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

Generated using TypeDoc