Skip to content

Commit 910adb9

Browse files
committed
Don't block onEnter if request fails
closes #3286
1 parent b12cbd6 commit 910adb9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

editors/code/src/commands/on_enter.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ async function handleKeypress(ctx: Ctx) {
1919
const change = await client.sendRequest<undefined | SourceChange>(
2020
'rust-analyzer/onEnter',
2121
request,
22+
).catch(
23+
(_error: any) => {
24+
// FIXME: switch to the more modern (?) typed request infrastructure
25+
// client.logFailedRequest(OnEnterRequest.type, error);
26+
return Promise.resolve(null);
27+
}
2228
);
2329
if (!change) return false;
2430

0 commit comments

Comments
 (0)