-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Partial omission of emitted object if jsonification fails #5225
Comments
Closing this here as I should have posted this in the client repo. |
Hi! The library uses Not sure what we could do here. Maybe with a custom parser? Reference: https://socket.io/docs/v4/custom-parser/ |
Hi,
Maybe allowing a replacer function to be passed could be a solution? |
Describe the bug
When passing an object to an emit that contains a function reference it just quietly gets omitted.
To Reproduce
Checking traffic will show that
test
gets a message containing onlyWith no error or even warning on the console.
Expected behavior
If jsonification fails (which is what I suspect is happening here) I would expect at least a warning or a full transmission failure and not quiet removal of part of the transmitted object.
Platform:
Additional context
For context we initially found this with a misconfigured value from redux. A
console.log(data)
will produce the full object as expected.The text was updated successfully, but these errors were encountered: