mirror of
https://github.com/logos-messaging/js-rln.git
synced 2026-05-10 12:19:33 +00:00
add error log
This commit is contained in:
parent
a50cf9ce8e
commit
45faae6b6e
@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user