Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rename ResponseError not being passed onto VSCode #220

Closed
wants to merge 1 commit into from
Closed

Fix rename ResponseError not being passed onto VSCode #220

wants to merge 1 commit into from

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.

@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