This message was deleted.
# opal
s
This message was deleted.
o
The error seems to be 403 forbidden - meaning that the server rejected the connection due to wrong credentials. Unclear why it would happen in the interim of an existing session - maybe the server or client being restarted with the wrong config ?
Another option that comes to mind is if you have multiple servers behind a load balancer - a reconnect to a different server that isn’t configured the same can also produce this result. The server log for the server that sent the 403 can provide more information.
j
can we configure this to never stop trying to reconnect
o
Not at the moment; Also I’d advice against this - if your server is sending a 403 - something is clearly wrong.
👍 1
This is the relevant part of the code (part of the pub-sub library) : https://github.com/permitio/fastapi_websocket_pubsub/blob/8c08e116e6a3ab0de73b4408b9bf108e68e5cd87/fastapi_websocket_pubsub/pub_sub_client.py#L228 If you want to contribute a env var with say a list of status codes to ignore, I’d be happy to review a PR. But again - I wouldn’t recommend this as a long term solution
👍 1