atom / atom-languageclient

Language Server Protocol support for Atom (the basis of Atom-IDE)
https://ide.atom.io/
MIT License
388 stars 78 forks source link

Succesfully cancelled request still log a (spurious) error #274

Open Gert-dev opened 5 years ago

Gert-dev commented 5 years ago

Cancelled requests still appear to show an error in the console related to an unhandled promise rejection:

index.js:29 Unhandled promise rejection Promise {_c: Array(0), _a: Array(0), _s: 2, _d: true, _v: ResponseError: Request was cancelled
    at handleResponse (/home/user/.atom/packages/ide-yaml/node_mo…, …} with error: ResponseError: Request was cancelled
    at handleResponse (/home/user/.atom/packages/ide-yaml/node_modules/vscode-jsonrpc/lib/main.js:436:48)
    at processMessageQueue (/home/user/.atom/packages/ide-yaml/node_modules/vscode-jsonrpc/lib/main.js:263:17)
    at Immediate.setImmediate (/home/user/.atom/packages/ide-yaml/node_modules/vscode-jsonrpc/lib/main.js:247:13)
    at runCallback (timers.js:696:18)
    at tryOnImmediate (timers.js:667:5)
    at processImmediate (timers.js:649:5)

This appears to be a spurious error, as the request does appear to be properly cancelled and the cancel response received, as this is shown just above it:

rpc.sendRequest textDocument/completion was cancelled

This appears to be because the cancellation code is inside a JSON-RPC error, which is as expected (I think?) by the protocol.

UziTech commented 3 years ago

Development of atom-languageclient has officially moved to https://github.com/atom-ide-community/atom-languageclient 🎉

If this is still an issue please consider opening an issue on that repo.