fix: add error logging in fetchFromMultipleSources

This commit is contained in:
2024-09-22 15:46:08 -04:00
parent 79d856b18d
commit 1013d22024
2 changed files with 2 additions and 0 deletions

View File

@@ -51,6 +51,7 @@ app.openapi(route, async (c) => {
]);
if (errorOccurred) {
console.error(`Failed to fetch title ${aniListId}`);
return c.json(ErrorResponse, { status: 500 });
}

View File

@@ -33,6 +33,7 @@ export async function fetchFromMultipleSources<T>(
result = await promise();
if (result) break;
} catch (e) {
console.error(e);
errorCount++;
}
}