From 910adb9dc73b93a875773871df3b749d1e872192 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 24 Feb 2020 12:45:34 +0100 Subject: Don't block onEnter if request fails closes #3286 --- editors/code/src/commands/on_enter.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/editors/code/src/commands/on_enter.ts b/editors/code/src/commands/on_enter.ts index 25eaebcbe..27ae8ec23 100644 --- a/editors/code/src/commands/on_enter.ts +++ b/editors/code/src/commands/on_enter.ts @@ -19,6 +19,12 @@ async function handleKeypress(ctx: Ctx) { const change = await client.sendRequest( 'rust-analyzer/onEnter', request, + ).catch( + (_error: any) => { + // FIXME: switch to the more modern (?) typed request infrastructure + // client.logFailedRequest(OnEnterRequest.type, error); + return Promise.resolve(null); + } ); if (!change) return false; -- cgit v1.2.3