Class DiscordRESTError

A REST error received from Discord.

Hierarchy

Constructors

Properties

cause?: unknown
code: number
message: string
method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH"
name: string = "DiscordRESTError"
resBody: null | Record<string, unknown>
response: Response
stack?: string
prepareStackTrace?: ((err, stackTraces) => any)

Optional override for formatting stack traces

Type declaration

    • (err, stackTraces): any
    • Parameters

      • err: Error
      • stackTraces: CallSite[]

      Returns any

stackTraceLimit: number

Accessors

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void