Skip to content

Commit

Permalink
fix(cache): pass REPOSITORY_CHANGED error up (#19877)
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Jan 17, 2023
1 parent 09fca82 commit 5eb2368
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/workers/repository/cache.ts
@@ -1,5 +1,6 @@
/* istanbul ignore file */

import { REPOSITORY_CHANGED } from '../../constants/error-messages';
import { logger } from '../../logger';
import { platform } from '../../modules/platform';
import { getCache } from '../../util/cache/repository';
Expand Down Expand Up @@ -94,6 +95,9 @@ async function generateBranchCache(
logger.warn({ err, branchName }, 'HTTP error generating branch cache');
return null;
}
if (err.message === REPOSITORY_CHANGED) {
throw err;
}
logger.error({ err, branchName }, 'Error generating branch cache');
return null;
}
Expand Down

0 comments on commit 5eb2368

Please sign in to comment.