Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/3 Code Health/1867.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add better exception handling when parsing responses received from the Jedi language service.
10 changes: 8 additions & 2 deletions src/client/providers/jediProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,15 @@ export class JediProxy implements Disposable {
}

responses.forEach((response) => {
if (!response) {
return;
}
const responseId = JediProxy.getProperty<number>(response, 'id');
const cmd = <IExecutionCommand<ICommandResult>>this.commands.get(responseId);
if (cmd === null) {
if (!this.commands.has(responseId)) {
return;
}
const cmd = this.commands.get(responseId);
if (!cmd) {
return;
}
this.lastCmdIdProcessed = cmd.id;
Expand Down