-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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: unexpected server response (404) #1208
Comments
Can be closed, apparently they're having their own websocket implementation which is just a wrapper. |
I search for other issues but this was the one that was most similar to mine. if not please point me in the right direction, thank you. I am trying to build tests for my api and when I send error code and messages from the api to the client in the verifyClient function like so:
However, when I go to check the error message it does not appear, the library only returns the client code:
node_modules/ws/lib/WebSocket.js:653
|
@paulddrix see Lines 513 to 526 in 84fa837
|
My understanding is if a response is received then the unexpected-response event is triggered, that would mean that if the connection is accepted then there should be no response because the request or connection was upgraded, is that correct. if is is then all status codes that are returned can triggered the event. Thank your for your time. |
Yes that's correct because for an upgrade request, you should receive an upgrade response. Lines 257 to 262 in 84fa837
|
I am trying to connect to PubNub using a websocket, just like the example here but with node: https://www.pubnub.com/websockets/
The example code works fine in the browser, but using
ws
I get:Any idea what could be going wrong here? Any workaround?
The text was updated successfully, but these errors were encountered: