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

Error is fired without 'type' #1028

Open
AlonBru opened this issue Jan 28, 2023 · 3 comments
Open

Error is fired without 'type' #1028

AlonBru opened this issue Jan 28, 2023 · 3 comments
Labels
client related to peerjs client documentation need update some info in doc feature suggestions for new features or enhancements

Comments

@AlonBru
Copy link

AlonBru commented Jan 28, 2023

Reproduction:

  • create 2 peers peerA and peerB
  • add to peer B 'open' event listener to have a way store data connection on open and add 'error' listener on the dataConnection
  • connect with peerA to peerB, then close the connection immediately.
  • try using connection.send() from peerB

Result:
Receiving these errors, however they do not seem to have a defined 'type' property as
image

Expectation:
As per the docs for peer errors, these errors should also have a 'type' so as to allow to better handle them in code

@jonasgloning jonasgloning added feature suggestions for new features or enhancements documentation need update some info in doc labels Jan 29, 2023
@jonasgloning
Copy link
Member

The docs refer to the 'error' event on the Peer instance, not on the data connection. Those currently don’t have a type property.

This is not directly a bug, but I see that this is confusing and poorly documented. We’ll add them eventually.

@AlonBru
Copy link
Author

AlonBru commented Jan 29, 2023

Thanks for the quick reply.
To clarify my positiosn, I understand the docs refer to the Peer 'error' event, my suggestion is for the dataConnection to follow a similar pattern.

@AlonBru
Copy link
Author

AlonBru commented Jan 29, 2023

I have created #1029 to address this

@irgalamarr irgalamarr added the client related to peerjs client label Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client related to peerjs client documentation need update some info in doc feature suggestions for new features or enhancements
Projects
None yet
Development

No branches or pull requests

3 participants