Skip to content
Snippets Groups Projects
Unverified Commit 855a55c2 authored by Michael Kriese's avatar Michael Kriese Committed by GitHub
Browse files

fix(nuget): pass ExternalHostError up (#10751)

parent 19d6822a
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@ import pAll from 'p-all';
import * as semver from 'semver';
import { XmlDocument } from 'xmldoc';
import { logger } from '../../logger';
import { ExternalHostError } from '../../types/errors/external-host-error';
import * as packageCache from '../../util/cache/package';
import { Http } from '../../util/http';
import { HttpError } from '../../util/http/types';
......@@ -174,6 +175,10 @@ export async function getReleases(
}
}
} catch (err) {
// istanbul ignore if: not easy testable with nock
if (err instanceof ExternalHostError) {
throw err;
}
// ignore / silence 404. Seen on proget, if remote connector is used and package is not yet cached
if (err instanceof HttpError && err.response?.statusCode === 404) {
logger.debug(
......
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