Merge pull request 'Use while in fetchData function' (#78) from theycallhermax/poke-fork:main into main

Reviewed-on: https://codeberg.org/ashley/poke/pulls/78
Reviewed-by: Korbs <korbs@noreply.codeberg.org>
This commit is contained in:
Ashley //// 2024-04-21 03:07:52 +00:00
commit 1e3fd63d56

View file

@ -81,7 +81,7 @@ class InnerTubePokeVidious {
*/
const response = await fetch(url, { headers });
if (response.status === 500) {
while (response.status === 500) {
// If status is 500, fetch again
console.log("Retrying due to status 500...");
return fetchData(url, headers);