Handle network requests failing more gracefully
This commit is contained in:
parent
040b427d97
commit
9eb25f706e
@ -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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user