Try catch generate thumbnail

This commit is contained in:
xen-42 2025-07-02 01:48:37 -04:00 committed by GitHub
parent 41bf48e152
commit ea57301386
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;