Options
All
  • Public
  • Public/Protected
  • All
Menu

An error coming from the mongo server

Hierarchy

Indexable

[key: string]: any

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)

Optional override for formatting stack traces

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
codeName?: string
writeConcernError?: <internal>.Document
ok?: number
message: string
stack?: string

Accessors

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

    Returns string

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

  • get name(): string
  • Returns string

Constructors

Generated using TypeDoc