Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DiscordRESTError

Hierarchy

  • Error
    • DiscordRESTError

Index

Constructors

constructor

  • Parameters

    • req: ClientRequest
    • res: IncomingMessage
    • response: HTTPResponse
    • stack: string

    Returns DiscordRESTError

Properties

code

code: number

message

message: string

name

name: string

req

req: ClientRequest

res

res: IncomingMessage

response

response: HTTPResponse

Optional stack

stack: string

Static Optional prepareStackTrace

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

Type declaration

    • (err: Error, stackTraces: CallSite[]): any
    • Optional override for formatting stack traces

      Parameters

      • err: Error
      • stackTraces: CallSite[]

      Returns any

Static stackTraceLimit

stackTraceLimit: number

Methods

flattenErrors

  • flattenErrors(errors: HTTPResponse, keyPrefix?: string): string[]
  • Parameters

    Returns string[]

Static captureStackTrace

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

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc