Skip to content

Handle errors coming from LS responses for completion items - #1039

Merged
rubenporras merged 4 commits into
eclipse-lsp4e:mainfrom
BoykoAlex:error-completion-proposals
Jul 19, 2024
Merged

rubenporras merged 4 commits into
eclipse-lsp4e:mainfrom
BoykoAlex:error-completion-proposals

Conversation

@BoykoAlex

Copy link
Copy Markdown
Contributor

Fixes #1038

anyIncomplete.set(true);
}
}).exceptionally(t -> {
LanguageServerPlugin.logError("'%s' LS failed to compute completion items.".formatted(w.serverDefinition.label), t); //$NON-NLS-1$

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we not need an if such as
if (!CancellationUtil.isRequestCancelledException(e)) { // do not report error if the server has cancelled the request here as well?

@BoykoAlex BoykoAlex Jul 19, 2024 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point :-) Corrected...

@rubenporras rubenporras left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

anyIncomplete.set(true);
}
}).exceptionally(t -> {
if (!CancellationUtil.isRequestCancelledException(t)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need now lines 152-154?

@BoykoAlex BoykoAlex Jul 19, 2024 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No those lines are not needed any more indeed. Corrected as well

@BoykoAlex BoykoAlex self-assigned this Jul 19, 2024
@rubenporras
rubenporras merged commit 75d300b into eclipse-lsp4e:main Jul 19, 2024
@rubenporras

Copy link
Copy Markdown
Contributor

Thanks

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.

do not cancel message handling if one of multiple language servers reports an error

2 participants