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

Add RequestFailed and ServerCancelled LSP specific error codes? #411

Open
DavisVaughan opened this issue Jan 26, 2024 · 0 comments
Open

Comments

@DavisVaughan
Copy link

I see these two LSP specific error codes:

/// The request was cancelled by the client.
///
/// # Compatibility
///
/// This error code is defined by the Language Server Protocol.
RequestCancelled,
/// The request was invalidated by another incoming request.
///
/// # Compatibility
///
/// This error code is specific to the Language Server Protocol.
ContentModified,

In 3.17 we got a few more:
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#responseMessage

Notably:

/**
	 * 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.
	 *
	 * @since 3.17.0
	 */
	export const RequestFailed: [integer](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#integer) = -32803;

	/**
	 * The server cancelled the request. This error code should
	 * only be used for requests that explicitly support being
	 * server cancellable.
	 *
	 * @since 3.17.0
	 */
	export const ServerCancelled: [integer](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#integer) = -32802;

Would it make sense to add these in?

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

No branches or pull requests

1 participant