Skip to content

Commit

Permalink
describe to get a more verbose stacktrace when consume exception happ…
Browse files Browse the repository at this point in the history
…ens.
  • Loading branch information
shlomiku committed Jul 27, 2020
1 parent c87daca commit cc2bb4f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,19 @@ same `channel_pat` will overwrite the old handler.
Deregisters the event handler function that was previously registered via `on` or
`register` method.

#### Debugging
Websocket exceptions may occur during execution.
It will usually happen during the `consume()` method, which basically is the
websocket steady-state.<br>
exceptions during the consume method may occur due to:
- server disconnections
- error while handling the response data

We handle the first issue by reconnecting the websocket every time there's a disconnection.
The second issue, is usually a user's code issue. To help you find it, we added a flag to the
StreamConn object called `debug`. It is set to False by default, but you can turn it on to get a more
verbose logs when this exception happens.
Turn it on like so `StreamConn(debug=True)`

---
# Polygon API Service
Expand Down

0 comments on commit cc2bb4f

Please sign in to comment.