Skip to content

Commit

Permalink
fix: cache handle nested err (#12730)
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Nov 18, 2021
1 parent 4d1e7b1 commit d3eb6fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/workers/repository/cache.ts
Expand Up @@ -75,7 +75,8 @@ async function generateBranchCache(branch: BranchConfig): Promise<BranchCache> {
isModified,
upgrades,
};
} catch (err) {
} catch (error) {
const err = error.err || error; // external host error nests err
const errCodes = [401, 404];
// istanbul ignore if
if (errCodes.includes(err.response?.statusCode)) {
Expand Down

0 comments on commit d3eb6fe

Please sign in to comment.