Cancelled requests from cpptools server don't throw exceptions in extension host #12591
Labels
bug
fixed
Check the Milestone for the release in which the fix is or will be available.
internal
Used to opt-out an issue from having GitHub actions applied to it
Language Service
Milestone
Environment
Bug Summary and Steps to Reproduce
If the cpptools server cancels an LSP request, the error information is returned directly as a result instead of propagating as an exception into the extension host. In the screenshot below, I have a dummy LSP handler than always cancels.
The expected behavior when the JSON-RPC message indicates an error is that an exception is thrown, which can then be handled with normal try/catch mechanisms in Typescript.
This is happening because when the cpptools server cancels a request, it puts ResponseError information into the
result
member of the ResponseMessage. It should actually go into theerror
member to be correctly handled by vscode-jsonrpc.Configuration and Logs
N/A
Other Extensions
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: