You should check the response code after making the Twitch API request. Generally you will receive a response code that is 200 OK with good data, but when there is any kind of error you will receive something else. It will likely be a 400 BAD REQUEST error.