Handle network requests failing more gracefully

This commit is contained in:
pfych 2025-04-30 19:26:25 +10:00
parent 040b427d97
commit 9eb25f706e

View File

@ -22,6 +22,7 @@ void (async () => {
await getMangaToFetch(config);
for (const mangaId of uniqueMangaIds) {
try {
const lastChapterId = await mangaHistory.get<ChapterId>(mangaId);
const manga = await getManga(mangaId, userAgent);
@ -51,6 +52,10 @@ void (async () => {
} else {
console.log('No Updates found for manga:', title);
}
} catch (err) {
console.error(`Failed to fetch ${mangaId}!`);
console.error(err);
}
}
};