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

feat!: be resilient to LSP protocol errors #56

Merged
merged 1 commit into from
May 20, 2024
Merged

Conversation

mhanberg
Copy link
Collaborator

@mhanberg mhanberg commented May 20, 2024

Previously, if a user passed non compliant reply to a request, the
framework would raise and your server would crash.

Previously, if a client sent an invalid request or notification, the
framework would raise, not providing a good error for the user or the
LSP author.

Now, in those three cases, if the framework sees a non-compliant
response, it will respond to the client with a relevant error code and
message.

Note: in the case of notifications, we just log, as there is nothing to
respond to.

@mhanberg mhanberg force-pushed the better-error-logging branch from 700d4e7 to 533b3d8 Compare May 20, 2024 12:06
@mhanberg mhanberg changed the title better error logging feat!: be resilient to LSP protocol errors May 20, 2024
Previously, if a user passed non compliant reply to a request, the
framework would raise and your server would crash.

Previously, if a client sent an invalid request or notification, the
framework would raise, not providing a good error for the user or the
LSP author.

Now, in those three cases, if the framework sees a non-compliant
response, it will respond to the client with a relevant error code and
message.

Note: in the case of notifications, we just log, as there is nothing to
respond to.
@mhanberg mhanberg force-pushed the better-error-logging branch from 533b3d8 to a766421 Compare May 20, 2024 12:24
@mhanberg mhanberg merged commit fce380f into main May 20, 2024
17 checks passed
@mhanberg mhanberg deleted the better-error-logging branch May 20, 2024 12:28
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.

1 participant