Retry HTTP(S) requests for non-429 status codes

This commit is contained in:
q13x 2024-05-25 01:05:46 -07:00
parent 94c628b822
commit 1687d30417

View File

@ -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);
}
});
});