Skip to content

Commit 9b6939e

Browse files
committed
Fix errors from mangadex scraper
1 parent ccb4cca commit 9b6939e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/scrapers/mangadex.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@ export default {
1717
`${baseUrl}/manga/${id}/feed?translatedLanguage[]=en&order[chapter]=desc&includes[]=manga&limit=1`
1818
);
1919
if (!response.ok) {
20-
throw new Error(`Failed to fetch latest chapter from id ${id}`);
20+
console.error(`Failed to fetch latest chapter from id ${id}`);
21+
continue;
2122
}
2223

2324
const json = await (<Promise<Chapter>>response.json());
2425

2526
if (!json.data.length) {
26-
throw new Error(`No chapters found for id ${id}`);
27+
console.error(`No chapters found for id ${id}`);
28+
continue;
2729
}
2830

2931
const latestChapter = json.data[0].attributes.chapter;

0 commit comments

Comments
 (0)