Skip to content

Gracefully handle JSON.parse errors #455

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

Merged
merged 1 commit into from
Jan 24, 2023

Conversation

AlexTugarev
Copy link
Contributor

This PR improves handling of parse errors for incoming message.

Copy link
Collaborator

@CGNonofr CGNonofr left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

Were you experiencing issues or is this theoretical?

Or does this change comes from somewhere particular?

@CGNonofr
Copy link
Collaborator

CGNonofr commented Jan 24, 2023

@kaisalmen I'll let you have a look and merge, LGTM

@AlexTugarev
Copy link
Contributor Author

Were you experiencing issues or is this theoretical?

I'd like to avoid mentioning the impact of the missing error handling for good reasons. I hope you understand that it's likely a satisfactory response, that client of this library cannot handle such errors, which also means, the processing loop cannot recover.

You did request change, but didn't mention anything significant. If you are not happy with the error message returned, it would be great to tackle that as a follow-up.

@AlexTugarev AlexTugarev requested review from CGNonofr and removed request for kaisalmen January 24, 2023 10:32
@kaisalmen
Copy link
Collaborator

I have no objections. Who is going to push the button?

@CGNonofr CGNonofr merged commit 51d7aad into TypeFox:main Jan 24, 2023
@kaisalmen
Copy link
Collaborator

@AlexTugarev I guess you require a new release?

@AlexTugarev
Copy link
Contributor Author

👋🏻 @kaisalmen!
Indeed, it would be awesome ifvscode-ws-jsonrpc would be updated soon.

🦊 🍻

@kaisalmen
Copy link
Collaborator

Here you go: https://www.npmjs.com/package/vscode-ws-jsonrpc/v/2.0.2

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.

3 participants