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: include error as description for parse errors closes #1556

Closed
wants to merge 1 commit into from
Closed

feat: include error as description for parse errors closes #1556

wants to merge 1 commit into from

Conversation

MasterOdin
Copy link

Note: the socket.io.js file is the generated output of make socket.io.js, and should not be manually modified.

The kind of change this PR does introduce

  • a bug fix
  • a new feature
  • an update to the documentation
  • a code change that improves performance
  • other

Current behaviour

When the client has an error decoding incoming data, it will currently close current connection, which will retrigger a reconnect. However, there's no good way to know what might have caused the parse error and makes debugging them much harder.

New behaviour

Now, the error that was raised during parsing is attached as the optional description field on the onclose and so the user can get at it as described in the 4.5.0 release notes.

The error includes the data for ease of debugging, but that could probably be removed as that info should be accessible via the network inspection.

Other information (e.g. related issues)

Closes #1554

@darrachequesne
Copy link
Member

Merged into 2403b88. Thanks a lot 👍

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.

handle "parse" errors
2 participants