udoprog / OxidizeBot

High performance Twitch bot in Rust
https://setbac.tv
Apache License 2.0
157 stars 23 forks source link

Bot crashes on empty stream title #79

Closed Jqnxyz closed 4 years ago

Jqnxyz commented 4 years ago

Bot expects a String for key "status", while entering a value of the key is optional on Twitch web UI; returning either a String type as expected or a null value.

2020-08-07T22:38:21.797+08:00 INFO  oxidize - Starting Oxidize Bot Version 1.0.4-alpha.2
2020-08-07T22:38:21.798+08:00 INFO  oxidize::db - Using database: C:\Users\[Username]\AppData\Roaming\OxidizeBot\oxidize.sql
2020-08-07T22:38:21.822+08:00 INFO  oxidize - Listening on: http://localhost:12345
2020-08-07T22:38:21.829+08:00 INFO  oxidize::player - Initialize Player
2020-08-07T22:38:22.055+08:00 INFO  oxidize::player - Player is up and running!
2020-08-07T22:38:22.510+08:00 ERROR oxidize - Bot crashed
2020-08-07T22:38:22.510+08:00 ERROR oxidize - caused by: Bad response: GET: https://api.twitch.tv/kraken/channel: 200 OK: invalid type: null, expected a string at line 1 column 28: {.."status":null, ..}
Jqnxyz commented 4 years ago

Link to Twitch Kraken docs