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

LSP: consider RequestFailed for syntax errors #233

Open
amyreese opened this issue Aug 28, 2024 · 0 comments
Open

LSP: consider RequestFailed for syntax errors #233

amyreese opened this issue Aug 28, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@amyreese
Copy link
Member

amyreese commented Aug 28, 2024

Instead of sending or displaying warning/error messages, consider raising a RequestFailed error code:

raise JsonRpcException(
    code=-32803,
    message=...,
)

A request failed but it was syntactically correct, e.g the
method name was known and the parameters were valid. The error
message should contain human readable information about why
the request failed.

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#responseError

@amyreese amyreese changed the title LSP: raise LSP: consider RequestFailed error instead of displaying messages Aug 28, 2024
@amyreese amyreese added the enhancement New feature or request label Aug 28, 2024
@amyreese amyreese changed the title LSP: consider RequestFailed error instead of displaying messages LSP: consider RequestFailed for syntax errors Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant