mirror of
https://github.com/danbulant/discord.js
synced 2026-06-09 01:31:29 +00:00
update retry case for 5xx (#1765)
This commit is contained in:
parent
d9262f2682
commit
3c7869c1b7
1 changed files with 1 additions and 1 deletions
|
|
@ -45,7 +45,7 @@ class RequestHandler {
|
||||||
if (err.status === 429) {
|
if (err.status === 429) {
|
||||||
this.queue.unshift(item);
|
this.queue.unshift(item);
|
||||||
finish(Number(res.headers['retry-after']) + this.client.options.restTimeOffset);
|
finish(Number(res.headers['retry-after']) + this.client.options.restTimeOffset);
|
||||||
} else if (err.status === 500) {
|
} else if (err.status >= 500 && err.status < 600) {
|
||||||
this.queue.unshift(item);
|
this.queue.unshift(item);
|
||||||
finish(1e3 + this.client.options.restTimeOffset);
|
finish(1e3 + this.client.options.restTimeOffset);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue