Preview environment

class DiscordAPIError

extends

Error
export 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

code : number | string

method : string

readonly
name : string

The name of the error

requestBody : RequestBody

status : number

url : string