Don't block onEnter if request fails

closes #3286
This commit is contained in:
Aleksey Kladov 2020-02-24 12:45:34 +01:00
parent b12cbd6062
commit 910adb9dc7

View file

@ -19,6 +19,12 @@ async function handleKeypress(ctx: Ctx) {
const change = await client.sendRequest<undefined | SourceChange>(
'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;