提交 1567e662 编写于 作者: J Joao Moreno

only show update service errors when asking explicitly

fixes #61467
fixes #60966
上级 868f812b
...@@ -44,7 +44,10 @@ export class DarwinUpdateService extends AbstractUpdateService { ...@@ -44,7 +44,10 @@ export class DarwinUpdateService extends AbstractUpdateService {
private onError(err: string): void { private onError(err: string): void {
this.logService.error('UpdateService error:', err); this.logService.error('UpdateService error:', err);
this.setState(State.Idle(UpdateType.Archive, err));
// only show message when explicitly checking for updates
const message: string | undefined = !!context ? err : undefined;
this.setState(State.Idle(UpdateType.Archive, message));
} }
protected buildUpdateFeedUrl(quality: string): string | undefined { protected buildUpdateFeedUrl(quality: string): string | undefined {
......
...@@ -73,7 +73,10 @@ export class LinuxUpdateService extends AbstractUpdateService { ...@@ -73,7 +73,10 @@ export class LinuxUpdateService extends AbstractUpdateService {
} }
*/ */
this.telemetryService.publicLog('update:notAvailable', { explicit: !!context }); this.telemetryService.publicLog('update:notAvailable', { explicit: !!context });
this.setState(State.Idle(UpdateType.Archive, err.message || err));
// only show message when explicitly checking for updates
const message: string | undefined = !!context ? (err.message || err) : undefined;
this.setState(State.Idle(UpdateType.Archive, message));
}); });
} }
} }
......
...@@ -172,7 +172,10 @@ export class Win32UpdateService extends AbstractUpdateService { ...@@ -172,7 +172,10 @@ export class Win32UpdateService extends AbstractUpdateService {
} }
*/ */
this.telemetryService.publicLog('update:notAvailable', { explicit: !!context }); this.telemetryService.publicLog('update:notAvailable', { explicit: !!context });
this.setState(State.Idle(getUpdateType(), err.message || err));
// only show message when explicitly checking for updates
const message: string | undefined = !!context ? (err.message || err) : undefined;
this.setState(State.Idle(getUpdateType(), message));
}); });
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册