提交 3c59a492 编写于 作者: R Rob Lourens

Settings search - Don't send error telemetry with no details

上级 54f56f7d
......@@ -51,7 +51,7 @@ export const xhrRequest: IRequestFunction = (options: IRequestOptions): TPromise
setRequestHeaders(xhr, options);
xhr.responseType = 'arraybuffer';
xhr.onerror = e => reject(new Error('XHR failed: ' + xhr.statusText));
xhr.onerror = e => reject(new Error(xhr.statusText && ('XHR failed: ' + xhr.statusText)));
xhr.onload = (e) => {
resolve({
res: {
......
......@@ -518,8 +518,12 @@ class PreferencesRenderersController extends Disposable {
"message": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
const message = getErrorMessage(err);
this.telemetryService.publicLog('defaultSettings.searchError', { message });
const message = getErrorMessage(err).trim();
if (message) {
// Empty message = any generic network error
this.telemetryService.publicLog('defaultSettings.searchError', { message });
}
return null;
}
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册