add error log

This commit is contained in:
weboko 2023-04-28 01:06:27 +02:00
parent a50cf9ce8e
commit 45faae6b6e
No known key found for this signature in database

View File

@ -197,7 +197,8 @@ function* takeN<T>(array: T[], size: number): Iterable<T[]> {
}
function ignoreErrors<T>(promise: Promise<T>, defaultValue: T): Promise<T> {
return promise.catch((_) => {
return promise.catch((err) => {
console.error(`Ignoring an error during query: ${err?.message}`);
return defaultValue;
});
}