DiscordAPIError

Represents an API error returned by Discord Error
export declare class DiscordAPIError extends Error 

Extends

Error

constructor(rawError, code, status, method, url, bodyData)

Constructs a new instance of the DiscordAPIError class
NameTypeOptionalDescription
rawErrorDiscordErrorData | OAuthErrorDataNo
The error reported by Discord
codenumber | stringNo
The error code reported by Discord
statusnumberNo
The status code of the response
methodstringNo
The method of the request that erred
urlstringNo
The url of the request that erred
bodyDataPick<InternalRequest, 'files' | 'body'>No
The unparsed data for the request that errored

code

:

number | string

method

:

string

Readonly

name

:

string

The name of the error

requestBody

:

RequestBody

status

:

number

url

:

string