DiscordError
Erroropen in new window
DiscordError extendsA class representing a Discord error
Properties
.attachments
The attachments sent in the request
type attachments = Attachment[] | undefined;
.body
The body sent in the request, if any
type body = Json | undefined;
- See Json
- See undefinedopen in new window
.headers
Headers sent in the request
type headers = OutgoingHttpHeaders;
.method
Method used in the request
type method = RequestMethod;
- See RequestMethod
.path
Path of the request
type path = Path;
- See Path
.query
The query of the request
type query = string | undefined;
.status
The status message received from the API
type status = string;
.statusCode
The status code received from this request
type statusCode = number;
Constructor
new DiscordError(request, res);
Parameter | Default | Description | Type | Required |
---|---|---|---|---|
request | - | The request sent | APIRequest | true |
res | - | The response received | Response | true |