Class DiscordHTTPError

An HTTP error received from Discord.

Hierarchy

  • Error
    • DiscordHTTPError

Constructors

  • Parameters

    • res: Response
    • resBody: unknown
    • method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"
    • Optional stack: string

    Returns DiscordHTTPError

Properties

cause?: unknown
message: string
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"
name: string = "DiscordHTTPError"
resBody: null | Record<string, unknown>
response: Response
stack?: string
prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Type declaration

stackTraceLimit: number

Accessors

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void