fix: add error logging in fetchFromMultipleSources
This commit is contained in:
@@ -51,6 +51,7 @@ app.openapi(route, async (c) => {
|
||||
]);
|
||||
|
||||
if (errorOccurred) {
|
||||
console.error(`Failed to fetch title ${aniListId}`);
|
||||
return c.json(ErrorResponse, { status: 500 });
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ export async function fetchFromMultipleSources<T>(
|
||||
result = await promise();
|
||||
if (result) break;
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
errorCount++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user