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

fix(cache): handle 401

parent d6dd27f6
No related branches found
No related tags found
No related merge requests found
...@@ -76,12 +76,10 @@ async function generateBranchCache(branch: BranchConfig): Promise<BranchCache> { ...@@ -76,12 +76,10 @@ async function generateBranchCache(branch: BranchConfig): Promise<BranchCache> {
upgrades, upgrades,
}; };
} catch (err) { } catch (err) {
const errCodes = [401, 404];
// istanbul ignore if // istanbul ignore if
if (err.response?.statusCode === 404) { if (errCodes.includes(err.response?.statusCode)) {
logger.warn( logger.warn({ err, branchName }, 'HTTP error generating branch cache');
{ err, branchName },
'404 error when generating branch cache'
);
return null; return null;
} }
logger.error({ err, branchName }, 'Error generating branch cache'); logger.error({ err, branchName }, 'Error generating branch cache');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment