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