WebSocketClient should propagate ConnectionClosedError after max_reconnects
Currently it silently just ends after max reconnects is exceeded, instead of return it should raise the ConnectionClosedError.
Hey @projects2080, I can bubble this error up if you still need it. Did you figure out another way? I was thinking about adding something to the readme around error handling and just curious what you came up with.
My workaround was to assume that anytime the await connect() call ends unless specifically closed by me, it's an exception. I do still recommend re-raising the ConnectionClosedError if reconnects > self.max_reconnects, and make it clear that by default the client will silently be trying to reconnect unless user provides max_reconnects = 0.
Great, thanks @projects2080.
Any ETA on this?
Hey @projects2080, this issue has been addressed in our latest release, v1.16.0. For full details on what's new, check out the release notes.
To upgrade and get the fix:
pip install -U polygon-api-client
I'm closing this issue for now, but feel free to reopen it if the problem persists or if you have more details!