Is there a way to catch the WebSocketError when the client (frontend) explicitly closes the connection?
Currently, I have the following errors in my logs:
[uwsgi] WebSocketError: unable to receive websocket message
| Traceback (most recent call last):
| File "/var/www/lib/python3.5/site-packages/ws4redis/uwsgi_runserver.py", line 28, in receive
| return uwsgi.websocket_recv_nb()
| OSError: unable to receive websocket message
|
| During handling of the above exception, another exception occurred:
|
| Traceback (most recent call last):
| File "/var/www/lib/python3.5/site-packages/ws4redis/wsgi_server.py", line 123, in __call__
| recvmsg = RedisMessage(websocket.receive())
| File "/var/www/lib/python3.5/site-packages/ws4redis/uwsgi_runserver.py", line 31, in receive
| raise WebSocketError(e)
| ws4redis.exceptions.WebSocketError: unable to receive websocket message
| [uwsgi] WebSocketError: unable to receive websocket message
| Traceback (most recent call last):
| File "/var/www/lib/python3.5/site-packages/ws4redis/uwsgi_runserver.py", line 28, in receive
| return uwsgi.websocket_recv_nb()
| OSError: unable to receive websocket message
It's not critical but it should be better to catch this specific error.
Is there a way to catch the
WebSocketError
when the client (frontend) explicitly closes the connection? Currently, I have the following errors in my logs:It's not critical but it should be better to catch this specific error.