From 1687d30417a60fd4406b229b7dc4ff7f1beb22a4 Mon Sep 17 00:00:00 2001 From: q13x <84165981+WorldEditAxe@users.noreply.github.com> Date: Sat, 25 May 2024 01:05:46 -0700 Subject: [PATCH] Retry HTTP(S) requests for non-429 status codes --- src/proxy/skins/EaglerSkins.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/proxy/skins/EaglerSkins.ts b/src/proxy/skins/EaglerSkins.ts index ce4e46d..366acd0 100644 --- a/src/proxy/skins/EaglerSkins.ts +++ b/src/proxy/skins/EaglerSkins.ts @@ -93,7 +93,7 @@ export namespace EaglerSkins { res(await downloadSkin(skinUrl)); } catch (err) { if (err.status == 429) throw new Error("Ratelimited!"); - else rej("Unexpected HTTP status code: " + err.status); + else throw new Error("Unexpected HTTP status code: " + err.status); } }); });