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

fix(rubygems): throw registry-failure when failing to download

parent 7f509b3d
No related merge requests found
......@@ -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;
}
......
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