Skip to content
Snippets Groups Projects
Unverified Commit d3eb6fed authored by Rhys Arkins's avatar Rhys Arkins Committed by GitHub
Browse files

fix: cache handle nested err (#12730)

parent 4d1e7b15
No related branches found
No related tags found
No related merge requests found
...@@ -75,7 +75,8 @@ async function generateBranchCache(branch: BranchConfig): Promise<BranchCache> { ...@@ -75,7 +75,8 @@ async function generateBranchCache(branch: BranchConfig): Promise<BranchCache> {
isModified, isModified,
upgrades, upgrades,
}; };
} catch (err) { } catch (error) {
const err = error.err || error; // external host error nests err
const errCodes = [401, 404]; const errCodes = [401, 404];
// istanbul ignore if // istanbul ignore if
if (errCodes.includes(err.response?.statusCode)) { if (errCodes.includes(err.response?.statusCode)) {
......
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