mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 17:43:30 +01:00
Fix constants errors not giving a stacktrace
This commit is contained in:
@@ -21,7 +21,7 @@ class APIRequest {
|
||||
} else if (this.rest.client.token) {
|
||||
return this.rest.client.token;
|
||||
}
|
||||
throw Constants.Errors.NO_TOKEN;
|
||||
throw new Error(Constants.Errors.NO_TOKEN);
|
||||
}
|
||||
|
||||
gen() {
|
||||
|
||||
@@ -29,7 +29,7 @@ class RESTManager {
|
||||
case 'sequential':
|
||||
return SequentialRequestHandler;
|
||||
default:
|
||||
throw Constants.Errors.INVALID_RATE_LIMIT_METHOD;
|
||||
throw new Error(Constants.Errors.INVALID_RATE_LIMIT_METHOD);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user