opentok / Opentok-Python-SDK

OpenTok Python SDK
https://tokbox.com/developer/sdks/python/
MIT License
73 stars 82 forks source link

list_streams throws when there are no streams in the session yet #211

Closed vineus closed 1 year ago

vineus commented 1 year ago

When there is no one in a session, the API URL:

https://api.opentok.com/v2/project/<project id>/session/<session id>/stream

returns an HTTP 404 error

current situation

currently in this case the list_streams() method throws with a generic error:

https://github.com/opentok/Opentok-Python-SDK/blob/290fdefdff173858a7cba017047f555d5c6c3096/opentok/opentok.py#L991-L992

expected behaviour

returns a StreamList with 0 stream

maxkahan commented 1 year ago

Added into #210