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

Warn/Error when an event is un-handled #42

Open
underfisk opened this issue Feb 7, 2021 · 3 comments
Open

Warn/Error when an event is un-handled #42

underfisk opened this issue Feb 7, 2021 · 3 comments

Comments

@underfisk
Copy link

Months ago i opened an issue regarding the event handler not being invoked, that issue was half fixed but it was related to the fact that usePusher sometimes do not re-bind (when the component/dependencies re-render or its just simply not registered on pusher.js)
What I would suggest is having a warning/error from usePusher when a pusher event is consumed on the client-side (via ws) but there are no handlers for it OR its simply not registered and it would help a lot debugging
This feature could be enabled in dev only or via some kind of debugging flag and would help a lot in identifying some issues

@mayteio
Copy link
Owner

mayteio commented Feb 9, 2021

Please provide a codesandbox with this issue and I will look into it.

@underfisk
Copy link
Author

I have a simple workaround for this, i have a middleware on Pusher.log method and i simply check if the message type includes callback not handled but its not so perfect, i think we can close this issue because you would end up doing the same or something similiar, sorry for the noise but i can share my implementation if you want

@mayteio
Copy link
Owner

mayteio commented Feb 25, 2021

Please share what you have 👍

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

No branches or pull requests

2 participants