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 thumbnailInfo = previousMod?.thumbnail ?? {};
|
||||||
|
|
||||||
const newThumbnail = await generateModThumbnail(
|
try {
|
||||||
slug,
|
const newThumbnail = await generateModThumbnail(
|
||||||
modInfo.thumbnailUrl,
|
slug,
|
||||||
readme?.downloadUrl,
|
modInfo.thumbnailUrl,
|
||||||
outputDirectory
|
readme?.downloadUrl,
|
||||||
);
|
outputDirectory
|
||||||
|
);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
console.error(`Failed to generate mod thumbnail for mod ${mod.uniqueName}: ${error}`);
|
||||||
|
}
|
||||||
|
|
||||||
if (newThumbnail.main) {
|
if (newThumbnail.main) {
|
||||||
thumbnailInfo.main = newThumbnail.main;
|
thumbnailInfo.main = newThumbnail.main;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user