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,7 +53,11 @@ 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');
} }
throw new DatasourceError(err); // istanbul ignore if
if (err.host === 'services.gradle.org') {
throw new DatasourceError(err);
}
return null;
} }
}) })
); );