-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Explanation for "Error: not opened" #394
Comments
Check the source code ( |
I see. Do you think we could make this error message a bit more developer-friendly? Something like that: if (this.readyState != WebSocket.OPEN) {
var err = new Error('Socket not opened. Expected state is OPEN but current state is set to ' + this.readyState.toString());
if (typeof cb == 'function') cb(err);
else throw err;
return;
} whereas I think that would be nice and will definitely help developers to spot bugs in their own app code. |
Well, IMHO "not opened "means that the state is not "open" :) but yes, yours would be more friendly. Note that I'm not the author at all, so don't hesitate to send a PR. But you cannot override the |
Yeah, the above was just "pseudo code". Would love to do a PR but have other priorities right now, sorry :( |
Here you go! :) @ibc |
Hello guys
This ticket is rather a request for an explanation of an error I do not fully understand. Do you think you could either add more context to the error or examine the following stack trace and tell me what it could be?
Many thanks!
The text was updated successfully, but these errors were encountered: