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

Ensure that all services that return MaybePromises are properly awaited #36

Merged
merged 2 commits into from
Jan 24, 2023

Conversation

tortmayr
Copy link
Contributor

@tortmayr tortmayr commented Jan 18, 2023

Otherwise we the server might crash in error cases due to unhandled promise rejections

Fixes eclipse-glsp/glsp#868

General cleanups/minor refactorings:

  • Remove Disposable and MaybePromise API and use protocol definitions instead.
  • Ensure that Action/Operation handlers use MaybePromise as return type when applicable
  • Ensure that the GLSPServer.process method forwards all unhandled errors to the client as notification

Contributed on behalf of STMicroelectronics

Requires eclipse-glsp/glsp-client#222

- Remove Disposable and MaybePromise API and use protocol definitions instead.
-Ensure that Action/Operation handlers use MaybePromise as return type when applicable
- Ensure that the GLSPServer.process method forwards all unhandled errors to the client as notification
Otherwise we the server might crash in error cases due to unhandled promise rejections

Contributed on behalf of STMicroelectronics
Copy link
Contributor

@martin-fleck-at martin-fleck-at left a comment

Choose a reason for hiding this comment

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

Change looks good to me and works well. Thank you very much Tobias!

@tortmayr tortmayr merged commit 9ed2eb9 into main Jan 24, 2023
@tortmayr tortmayr deleted the issue/fix-api branch January 24, 2023 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Node server does not handle potential maybe promise rejections
2 participants