atom-languageclient icon indicating copy to clipboard operation
atom-languageclient copied to clipboard

Succesfully cancelled request still log a (spurious) error

Open Gert-dev opened this issue 6 years ago • 1 comments

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.

Gert-dev avatar Sep 09 '19 19:09 Gert-dev

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.

UziTech avatar Oct 19 '20 19:10 UziTech