Skip to content

Commit 5afe7a3

Browse files
Merge pull request #893 from chuckries/telemetry
add PII comment to PackageError
2 parents 7092176 + aa70001 commit 5afe7a3

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) {
@@ -166,7 +167,7 @@ function downloadFile(urlString: string, pkg: Package, logger: Logger, status: S
166167
let request = https.request(options, response => {
167168
if (response.statusCode === 301 || response.statusCode === 302) {
168169
// Redirect - download from new location
169-
resolve(downloadFile(response.headers.location, pkg, logger, status));
170+
return resolve(downloadFile(response.headers.location, pkg, logger, status));
170171
}
171172

172173
if (response.statusCode != 200) {

0 commit comments

Comments
 (0)