mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 06:56:24 +00:00
fix(rubygems): throw registry-failure when failing to download
This commit is contained in:
parent
7f509b3dbe
commit
9999f47bf6
1 changed files with 3 additions and 3 deletions
|
@ -21,13 +21,13 @@ async function updateRubyGemsVersions() {
|
|||
logger.debug('Rubygems: Fetching rubygems.org versions');
|
||||
newLines = (await got(url, options)).body;
|
||||
} catch (err) /* istanbul ignore next */ {
|
||||
if (err.statusCode === 416) {
|
||||
logger.debug('Rubygems: No update');
|
||||
} else {
|
||||
if (err.statusCode !== 416) {
|
||||
logger.warn({ err }, 'Rubygems error - resetting cache');
|
||||
contentLength = 0;
|
||||
packageReleases = Object.create(null); // Because we might need a "constructor" key
|
||||
throw new Error('registry-failure');
|
||||
}
|
||||
logger.debug('Rubygems: No update');
|
||||
lastSync = new Date();
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue