API 参考
    正在准备搜索索引...

    An error thrown when the server reports a writeConcernError

    层级 (查看层级一览)

    可索引

    • [key: string]: any
    索引

    构造函数

    属性

    cause?: Error
    code?: string | number

    This is a number in MongoServerError and a string in MongoDriverError

    codeName?: string
    connectionGeneration?: number
    errInfo?: Document
    message: string
    ok?: number
    result?: Document

    The result document (provided if ok: 1)

    stack?: string
    topologyVersion?: TopologyVersion
    writeConcernError?: Document
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Optional override for formatting stack traces

    stackTraceLimit: number

    访问器

    • get errmsg(): string

      Legacy name for server error responses

      返回 string

    • get errorLabels(): string[]

      返回 string[]

    • get name(): string

      返回 string

    方法

    • 参数

      • label: string

      返回 void

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

      参数

      • label: string

        The error label to check for

      返回 boolean

      returns true if the error has the provided error label

    • Create .stack property on a target object

      参数

      • targetObject: object
      • 可选constructorOpt: Function

      返回 void