From 1a233a929746e591a6a7aabd2e75044bf5d4edab Mon Sep 17 00:00:00 2001 From: rastiqdev Date: Sun, 2 Jul 2023 21:55:32 +0200 Subject: [PATCH] Catch loadCache errors From vercel/hazel#138 --- lib/cache.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cache.js b/lib/cache.js index 66a001e..f999753 100644 --- a/lib/cache.js +++ b/lib/cache.js @@ -195,7 +195,7 @@ module.exports = class Cache { const { latest, refreshCache, isOutdated, lastUpdate } = this if (!lastUpdate || isOutdated()) { - await refreshCache() + await refreshCache().catch((error) => console.error(error)) } return Object.assign({}, latest)