DiscordAPIError
declare class DiscordAPIError extends Error
declare class DiscordAPIError extends Error
Represents an API error returned by Discord
Extends
Errorconstructor(rawError, code, status, method, url, bodyData)
Constructs a new instance of the
DiscordAPIError
className | Type | Optional | Description |
---|---|---|---|
rawError | DiscordErrorData | OAuthErrorData | No | The error reported by Discord |
code | number | string | No | The error code reported by Discord |
status | number | No | The status code of the response |
method | string | No | The method of the request that erred |
url | string | No | The url of the request that erred |
bodyData | Pick<InternalRequest, 'body' | 'files'> | No | The unparsed data for the request that errored |
code
:
number | string
method
:
string
Readonly
name
:
string
The name of the error