From 3c7869c1b7c04af72e37bb151290299db50cdc76 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Thu, 10 Aug 2017 13:31:45 -0500 Subject: [PATCH] update retry case for 5xx (#1765) --- src/client/rest/handlers/RequestHandler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/rest/handlers/RequestHandler.js b/src/client/rest/handlers/RequestHandler.js index 44427c80f..d1dea22e3 100644 --- a/src/client/rest/handlers/RequestHandler.js +++ b/src/client/rest/handlers/RequestHandler.js @@ -45,7 +45,7 @@ class RequestHandler { if (err.status === 429) { this.queue.unshift(item); 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); finish(1e3 + this.client.options.restTimeOffset); } else {