From 5d352a595a9cbc22fbb597f2d03441a4a50ee718 Mon Sep 17 00:00:00 2001 From: Andrey Kostyuchenko Date: Mon, 25 Jan 2021 14:21:51 +0300 Subject: [PATCH] PDKIO-1761: throw not 429 error --- src/authenticators/client.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/authenticators/client.js b/src/authenticators/client.js index 02c6e0f..570bfd3 100644 --- a/src/authenticators/client.js +++ b/src/authenticators/client.js @@ -59,8 +59,9 @@ async () => { } catch(err) { if (err && err.statusCode === 429) { await _sleep(1000); - return grantWrapFunc + return await grantWrapFunc(); } + throw err; } } outstanding = grantWrapFunc();