mirror of
https://github.com/ow-mods/ow-mod-db.git
synced 2025-12-11 20:15:24 +01:00
Try catch generate thumbnail
This commit is contained in:
parent
41bf48e152
commit
ea57301386
@ -58,12 +58,17 @@ export async function fetchMods(
|
||||
|
||||
const thumbnailInfo = previousMod?.thumbnail ?? {};
|
||||
|
||||
const newThumbnail = await generateModThumbnail(
|
||||
slug,
|
||||
modInfo.thumbnailUrl,
|
||||
readme?.downloadUrl,
|
||||
outputDirectory
|
||||
);
|
||||
try {
|
||||
const newThumbnail = await generateModThumbnail(
|
||||
slug,
|
||||
modInfo.thumbnailUrl,
|
||||
readme?.downloadUrl,
|
||||
outputDirectory
|
||||
);
|
||||
}
|
||||
catch (error) {
|
||||
console.error(`Failed to generate mod thumbnail for mod ${mod.uniqueName}: ${error}`);
|
||||
}
|
||||
|
||||
if (newThumbnail.main) {
|
||||
thumbnailInfo.main = newThumbnail.main;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user