Class DiscordHTTPError

An HTTP error from a request.

Hierarchy

  • Error
    • DiscordHTTPError

Constructors

  • Parameters

    • req: ClientRequest

      A client request

    • res: IncomingMessage

      An incoming message from the server

    • response: any

      Any Servers response class

    • stack: string

      The error stack

    Returns DiscordHTTPError

Properties

cause?: unknown
code: number

The status code from the response.

message: string

The response message.

req: ClientRequest

The client request of the error.

res: IncomingMessage

The response from the server.

response: any

The response class from a Server.

stack: string

The error stack.

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

Type declaration

stackTraceLimit: number

Accessors

Methods

  • Parameters

    • errors: any
    • keyPrefix: string = ""

    Returns string[]

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc