Skip to content

Fix rename ResponseError not being passed onto VSCode#220

Closed
Gama11 wants to merge 1 commit intomicrosoft:masterfrom
Gama11:patch-1
Closed

Fix rename ResponseError not being passed onto VSCode#220
Gama11 wants to merge 1 commit intomicrosoft:masterfrom
Gama11:patch-1

Conversation

@Gama11
Copy link
Contributor

@Gama11 Gama11 commented Jun 19, 2017

I was trying to return a ResponseError from the rename method in the Haxe language server to display an error in the UI (like the TypeScript language server does in some siutations, example).

However, no matter what error code I used, the end result was always the same, VSCode displays "No result." and the language client just logs it to the output channel:

This is probably not a proper solution, and there might be other methods that are affected similarly, but it does fix my issue:

@dbaeumer dbaeumer added this to the July 2017 milestone Jun 23, 2017
Gama11 added a commit to vshaxe/vshaxe that referenced this pull request Jun 30, 2017
@dbaeumer dbaeumer modified the milestones: August 2017, July 2017 Aug 4, 2017
@dbaeumer dbaeumer modified the milestones: September 2017, August 2017 Sep 12, 2017
@dbaeumer dbaeumer modified the milestones: September 2017, October 2017 Oct 6, 2017
@dbaeumer
Copy link
Member

dbaeumer commented Nov 7, 2017

@Gam11: thanks for the PR. However I fixed this differently since we usually avoid to throw with promises. The problem was that the code used Promise#resolve instead of Promise#reject.

@dbaeumer dbaeumer closed this Nov 7, 2017
@Gama11 Gama11 deleted the patch-1 branch November 7, 2017 09:50
@nadako
Copy link

nadako commented Nov 7, 2017

That fix doesn't really help with the original issue - VS Code still shows "No result" instead of the error message from the server.

@dbaeumer
Copy link
Member

dbaeumer commented Nov 8, 2017

Seems to be a VS Code issue. Opened microsoft/vscode#37808

@Gama11
Copy link
Contributor Author

Gama11 commented Mar 25, 2018

This is actually still an issue with VSCode 1.21.0 and vscode-languageclient 4.0.0:

I'm not sure which of the two is at fault, but this error shows up in the dev console after a failed rename:

I gave your test case from microsoft/vscode#37808 a try, and that works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants