mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 03:23:29 +01:00
feat(rest): use undici (#7747)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com> Co-authored-by: ckohen <chaikohen@gmail.com>
This commit is contained in:
@@ -8,7 +8,6 @@ export class HTTPError extends Error {
|
||||
public requestBody: RequestBody;
|
||||
|
||||
/**
|
||||
* @param message The error message
|
||||
* @param name The name of the error
|
||||
* @param status The status code of the response
|
||||
* @param method The method of the request that erred
|
||||
@@ -16,14 +15,13 @@ export class HTTPError extends Error {
|
||||
* @param bodyData The unparsed data for the request that errored
|
||||
*/
|
||||
public constructor(
|
||||
message: string,
|
||||
public override name: string,
|
||||
public status: number,
|
||||
public method: string,
|
||||
public url: string,
|
||||
bodyData: Pick<InternalRequest, 'files' | 'body'>,
|
||||
) {
|
||||
super(message);
|
||||
super();
|
||||
|
||||
this.requestBody = { files: bodyData.files, json: bodyData.body };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user