diff --git a/dist/index.js b/dist/index.js index ef6f141..026bcb8 100644 --- a/dist/index.js +++ b/dist/index.js @@ -7134,10 +7134,11 @@ async function downloadPyright(info3) { async function getPyrightInfo() { const version3 = await getPyrightVersion(); const client = new httpClient.HttpClient(); - const resp = await client.get(`https://registry.npmjs.org/pyright/${version3}`); + const url = `https://registry.npmjs.org/pyright/${version3}`; + const resp = await client.get(url); const body = await resp.readBody(); if (resp.message.statusCode !== httpClient.HttpCodes.OK) { - throw new Error(body); + throw new Error(`Failed to download metadata for pyright ${version3} from ${url} -- ${body}`); } return parseNpmRegistryResponse(JSON.parse(body)); } diff --git a/src/helpers.ts b/src/helpers.ts index fa1f550..6a898ba 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -206,10 +206,11 @@ async function downloadPyright(info: NpmRegistryResponse): Promise { async function getPyrightInfo(): Promise { const version = await getPyrightVersion(); const client = new httpClient.HttpClient(); - const resp = await client.get(`https://registry.npmjs.org/pyright/${version}`); + const url = `https://registry.npmjs.org/pyright/${version}`; + const resp = await client.get(url); const body = await resp.readBody(); if (resp.message.statusCode !== httpClient.HttpCodes.OK) { - throw new Error(body); + throw new Error(`Failed to download metadata for pyright ${version} from ${url} -- ${body}`); } return parseNpmRegistryResponse(JSON.parse(body)); }