-
Notifications
You must be signed in to change notification settings - Fork 51
Closed
Description
In vscode extension output window receives focus way to often. When it becomes focused then vscode hides terminal window.
At the moment csharp-ls returns error code 32000 for canceled request via $/cancelRequest. According to specs it should be 32800.
If the request returns an error response on cancellation it is advised to set the error code to ErrorCodes.RequestCancelled.
export const RequestCancelled: integer = -32800;
Logs:
[LSP - 8:47:00 AM] {"isLSPMessage":true,"type":"send-request","message":{"jsonrpc":"2.0","id":436,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///home/REDACTED.cs"},"range":{"start":{"line":868,"character":32},"end":{"line":868,"character":37}},"context":{"diagnostics":[{"range":{"start":{"line":868,"character":32},"end":{"line":868,"character":37}},"message":"The name 'order' does not exist in the current context","severity":1,"source":"lsp"}]}}},"timestamp":1650520020837}
[LSP - 8:47:01 AM] {"isLSPMessage":true,"type":"send-notification","message":{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///home/REDACTED.cs","version":199},"contentChanges":[{"range":{"start":{"line":868,"character":32},"end":{"line":868,"character":37}},"rangeLength":5,"text":"shoppingBasket"}]}},"timestamp":1650520021012}
[LSP - 8:47:01 AM] {"isLSPMessage":true,"type":"send-notification","message":{"jsonrpc":"2.0","method":"$/cancelRequest","params":{"id":436}},"timestamp":1650520021015}
[LSP - 8:47:01 AM] {"isLSPMessage":true,"type":"receive-response","message":{"jsonrpc":"2.0","id":436,"error":{"data":{"type":"System.Threading.Tasks.TaskCanceledException","message":"A task was canceled.","code":-2146233029},"code":-32000,"message":"A task was canceled."}},"timestamp":1650520021023}
[Error - 8:47:01 AM] Request textDocument/codeAction failed.
Message: A task was canceled.
Code: -32000
[object Object]
Metadata
Metadata
Assignees
Labels
No labels