mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 20:13:32 +01:00
Make sure we don't log an exception for cancelled ts requests while server is still coming online
Fixes #58781
This commit is contained in:
@@ -157,7 +157,7 @@ class GetErrRequest {
|
||||
};
|
||||
|
||||
client.executeAsync('geterr', args, _token.token)
|
||||
.then(undefined, () => { })
|
||||
.catch(() => true)
|
||||
.then(() => {
|
||||
if (this._done) {
|
||||
return;
|
||||
|
||||
@@ -26,7 +26,13 @@ class TypeScriptFoldingProvider implements vscode.FoldingRangeProvider {
|
||||
}
|
||||
|
||||
const args: Proto.FileRequestArgs = { file };
|
||||
const { body } = await this.client.execute('getOutliningSpans', args, token);
|
||||
let body: Proto.OutliningSpan[] | undefined;
|
||||
try {
|
||||
body = (await this.client.execute('getOutliningSpans', args, token)).body;
|
||||
} catch {
|
||||
// noop
|
||||
}
|
||||
|
||||
if (!body) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user