Skip to content

Commit d0e9ae9

Browse files
committed
refactor: missed cached, errors into warning
1 parent 61367d1 commit d0e9ae9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

indexer/src/cache/init.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export default async function initCache(context: ResolverContext) {
7676
};
7777
MEMORY_CACHE.set(HASH_RATE_AND_TOTAL_DIFFICULTY_KEY, newValue);
7878
} catch (err) {
79-
console.error('[WARN][CACHE][DB] Failed to get hash rate and total difficulty', err);
79+
console.warn('[WARN][CACHE][DB] Failed to get hash rate and total difficulty', err);
8080
}
8181
}
8282

@@ -91,7 +91,7 @@ export default async function initCache(context: ResolverContext) {
9191
const networkStatistics = await networkRepository.getNetworkStatistics();
9292
MEMORY_CACHE.set(NETWORK_STATISTICS_KEY, networkStatistics);
9393
} catch (err) {
94-
console.error('[WARN][CACHE][DB] Failed to get network statistics', err);
94+
console.warn('[WARN][CACHE][DB] Failed to get network statistics', err);
9595
}
9696
}
9797

@@ -106,7 +106,7 @@ export default async function initCache(context: ResolverContext) {
106106
const nodeInfo = await networkRepository.getNodeInfo();
107107
MEMORY_CACHE.set(NODE_INFO_KEY, nodeInfo);
108108
} catch (err) {
109-
console.error('[WARN][CACHE][DB] Failed to get node info', err);
109+
console.warn('[WARN][CACHE][DB] Failed to get node info', err);
110110
}
111111
}
112112

@@ -119,7 +119,7 @@ export default async function initCache(context: ResolverContext) {
119119
const counters = await networkRepository.getCountersOfEachChain();
120120
MEMORY_CACHE.set(COUNTERS_OF_EACH_CHAIN_KEY, counters);
121121
} catch (err) {
122-
console.error('[WARN][CACHE][DB] Failed to get counters of each chain', err);
122+
console.warn('[WARN][CACHE][DB] Failed to get counters of each chain', err);
123123
}
124124
}
125125

0 commit comments

Comments
 (0)