fix(gradle-version): only throw error for services.gradle.org

This commit is contained in:
Rhys Arkins 2020-02-14 12:53:27 +01:00
parent 81dbc4d7be
commit b53a7694df

View file

@ -53,8 +53,12 @@ export async function getPkgReleases({
if (!(err.statusCode === 404 || err.code === 'ENOTFOUND')) { if (!(err.statusCode === 404 || err.code === 'ENOTFOUND')) {
logger.warn({ err }, 'Gradle release lookup failure: Unknown error'); logger.warn({ err }, 'Gradle release lookup failure: Unknown error');
} }
// istanbul ignore if
if (err.host === 'services.gradle.org') {
throw new DatasourceError(err); throw new DatasourceError(err);
} }
return null;
}
}) })
); );