Skip to content
Snippets Groups Projects
Commit 6e494d11 authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix: try/catch all cache attempts

parent 1e1cdf8b
No related branches found
No related tags found
No related merge requests found
...@@ -75,6 +75,7 @@ async function get(path, options, retries = 5) { ...@@ -75,6 +75,7 @@ async function get(path, options, retries = 5) {
res.body = res.body.concat( res.body = res.body.concat(
...pages.filter(Boolean).map(page => page.body) ...pages.filter(Boolean).map(page => page.body)
); );
try {
const cacheMinutes = 60 * 24; const cacheMinutes = 60 * 24;
await renovateCache.set( await renovateCache.set(
cacheNamespace, cacheNamespace,
...@@ -82,6 +83,9 @@ async function get(path, options, retries = 5) { ...@@ -82,6 +83,9 @@ async function get(path, options, retries = 5) {
{ etag, body: res.body }, { etag, body: res.body },
cacheMinutes cacheMinutes
); );
} catch (err) /* istanbul ignore next */ {
logger.warn('Error setting renovateCache value');
}
} }
} }
if ( if (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment