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

Is it possible to catch "Handshake status 404 Not Found - goodbye" exceptions? #113

Open
wmmihaa opened this issue Nov 10, 2024 · 0 comments

Comments

@wmmihaa
Copy link

wmmihaa commented Nov 10, 2024

Describe the bug
Sometimes, when we have poor connections we get a websocket exception like this:

2024-11-10 14:37:49,942: Handshake status 404 Not Found - goodbye
2024-11-10 14:37:49,976: Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/websocket/_app.py", line 371, in setSock
    self.sock.connect(
  File "/usr/lib/python3.9/site-packages/websocket/_core.py", line 253, in connect
    self.handshake_response = handshake(self.sock, url, *addrs, **options)
  File "/usr/lib/python3.9/site-packages/websocket/_handshake.py", line 57, in handshake
    status, resp = _get_resp_headers(sock)
  File "/usr/lib/python3.9/site-packages/websocket/_handshake.py", line 147, in _get_resp_headers
    raise WebSocketBadStatusException("Handshake status %d %s", status, status_message, resp_headers)
websocket._exceptions.WebSocketBadStatusException: Handshake status 404 Not Found

2024-11-10 14:37:49,982: <signalrcore.transport.websockets.websocket_transport.WebsocketTransport object at 0xb52d38b0> Handshake status 404 Not Found
2024-11-10 14:37:49,989: Handshake status 404 Not Found <class 'websocket._exceptions.WebSocketBadStatusException'>

Is it possible to catch this exception so that we can manage retries?

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

1 participant