Closed divyamk closed 2 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
shop-iq | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Apr 8, 2024 4:59am |
on some runs calling the scrapeProducts function hangs and crashes.
for (var i = 0; i < 10; i++) {
const prod = await scrapeProduct(productLinks[i]);
productMotherLoad[prod.title] = prod;
}
} else {
for (var i = 0; i < productLinks.length; i++) {
const prod = await scrapeProduct(productLinks[i]);
productMotherLoad[prod.title] = prod;
}
}
in this section add a try catches to where the scrapeProduct is being called
on some runs calling the scrapeProducts function hangs and crashes.
for (var i = 0; i < 10; i++) { const prod = await scrapeProduct(productLinks[i]); productMotherLoad[prod.title] = prod; } } else { for (var i = 0; i < productLinks.length; i++) { const prod = await scrapeProduct(productLinks[i]); productMotherLoad[prod.title] = prod; } }
in this section add a try catches to where the scrapeProduct is being called
added try catch, also handled if exception was caught
Closes #63