This is probably related to
You are getting a non 200 error code and you are not testing for the error code, just trying to parse the JSON.
if the response is an error then you won’t get a streams
key in the JSON
This is probably related to
You are getting a non 200 error code and you are not testing for the error code, just trying to parse the JSON.
if the response is an error then you won’t get a streams
key in the JSON