Skip to content

Commit aa70001

Browse files
committed
add PII comment to PackageError
1 parent 26e2d12 commit aa70001

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/packages.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export interface Status {
3232
}
3333

3434
export class PackageError extends Error {
35+
// Do not put PII (personally identifiable information) in the 'message' field as it will be logged to telemetry
3536
constructor(public message: string,
3637
public pkg: Package = null,
3738
public innerError: any = null) {
@@ -167,7 +168,7 @@ function downloadFile(urlString: string, pkg: Package, logger: Logger, status: S
167168
let request = https.request(options, response => {
168169
if (response.statusCode === 301 || response.statusCode === 302) {
169170
// Redirect - download from new location
170-
resolve(downloadFile(response.headers.location, pkg, logger, status));
171+
return resolve(downloadFile(response.headers.location, pkg, logger, status));
171172
}
172173

173174
if (response.statusCode != 200) {

0 commit comments

Comments
 (0)