class DiscordAPIError

extends

Error
external
declare class DiscordAPIError extends Error

Represents an API error returned by Discord

Constructors

constructor(
code: number | string
status: number
method: string
url: string
bodyData: Pick<InternalRequest, 'body' | 'files'>
)

Constructs a new instance of the DiscordAPIError class

external
code : number | string

external
method : string

readonlyexternal
name : string

The name of the error

external
rawError : DiscordErrorData | OAuthErrorData

external
requestBody : RequestBody

external
status : number

external
url : string