Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/helix/channels returns status code 500 #592

Closed
bastimeyer opened this issue Apr 11, 2022 · 7 comments
Closed

/helix/channels returns status code 500 #592

bastimeyer opened this issue Apr 11, 2022 · 7 comments
Labels
product: api API endpoints in the "helix" namespace

Comments

@bastimeyer
Copy link

bastimeyer commented Apr 11, 2022

Brief description

This API issue has started happening a couple of minutes ago.

Depending on the broadcaster_id(s) set on the query string of the /helix/channels endpoint, a 500 error code is returned.

I first thought that this was caused by the number of the broadcaster_id parameters, and it only returned a 500 code when more than 6 were requested, but it looks like the faulty responses depend on the IDs themselves (or a combination, whatever).

How to reproduce

curl 'https://api.twitch.tv/helix/channels?broadcaster_id=26301881&broadcaster_id=23161357&broadcaster_id=108268890&broadcaster_id=50160915&broadcaster_id=49440419&broadcaster_id=39176440&broadcaster_id=31239503' \
  -H 'authorization: Bearer YOUR_OAUTH_TOKEN' \
  -H 'client-id: YOUR_CLIENT_ID'
{"error":"Internal Server Error","status":500,"message":""}

Expected behavior

curl 'https://api.twitch.tv/helix/channels?broadcaster_id=31239503' \
  -H 'authorization: Bearer YOUR_OAUTH_TOKEN' \
  -H 'client-id: YOUR_CLIENT_ID'
{"data":[{"broadcaster_id":"31239503","broadcaster_login":"esl_csgo","broadcaster_name":"ESL_CSGO","broadcaster_language":"en","game_id":"32399","game_name":"Counter-Strike: Global Offensive","title":"RERUN: Outsiders vs. FaZe - Map 2 [Dust2] - ESL Pro League Season 15 - Group B","delay":0}]}
@bastimeyer bastimeyer added the product: api API endpoints in the "helix" namespace label Apr 11, 2022
@belliapptw
Copy link

We have started investigating. Thank you for reporting this

@bastimeyer
Copy link
Author

The response now has changed to this instead of error code 500, but only sometimes:

{"error":"Too Many Requests","status":429,"message":"too many requests"}

curl 'https://api.twitch.tv/helix/channels?broadcaster_id=26301881&broadcaster_id=23161357&broadcaster_id=108268890&broadcaster_id=50160915&broadcaster_id=49440419' \
      -H 'authorization: Bearer YOUR_OAUTH_TOKEN' \
      -H 'client-id: YOUR_CLIENT_ID'
{"data":[{"broadcaster_id":"26301881","broadcaster_login":"sodapoppin","broadcaster_name":"sodapoppin","broadcaster_language":"en","game_id":"517251","game_name":"Mini Healer","title":"Poopoo Monday | https://sodapoppin.shop/plushies","delay":0},{"broadcaster_id":"23161357","broadcaster_login":"lirik","broadcaster_name":"LIRIK","broadcaster_language":"en","game_id":"509658","game_name":"Just Chatting","title":"LOLLLLLLLLLLLLLLLL","delay":0},{"broadcaster_id":"108268890","broadcaster_login":"gorgc","broadcaster_name":"Gorgc","broadcaster_language":"en","game_id":"29595","game_name":"Dota 2","title":"BOTA","delay":0},{"broadcaster_id":"50160915","broadcaster_login":"dreamleague","broadcaster_name":"DreamLeague","broadcaster_language":"en","game_id":"29595","game_name":"Dota 2","title":"LIVE: Chicken Fighters vs CHILLAX - DPC WEU Tour 2 - DreamLeague Season 17","delay":0},{"broadcaster_id":"49440419","broadcaster_login":"qojqva","broadcaster_name":"qojqva","broadcaster_language":"en","game_id":"29595","game_name":"Dota 2","title":"🔴 HIGHEST AVERAGE MMR PUB GAMES (10k+) 🔴 PARTY WITH XQC🔴 !youtube 🔴 !discord","delay":0}]}

Same request a couple of seconds later:

curl 'https://api.twitch.tv/helix/channels?broadcaster_id=26301881&broadcaster_id=23161357&broadcaster_id=108268890&broadcaster_id=50160915&broadcaster_id=49440419' \
      -H 'authorization: Bearer YOUR_OAUTH_TOKEN' \
      -H 'client-id: YOUR_CLIENT_ID'
{"error":"Too Many Requests","status":429,"message":"too many requests"}

@belliapptw
Copy link

These calls were always being rate limited. It just was not reflected to the clients correctly. Our fix that rolled out this afternoon, now accurately reflects the error.

@bastimeyer
Copy link
Author

I am not rate limited though

Status Code: 429
ratelimit-limit: 800
ratelimit-remaining: 798
ratelimit-reset: 1649720751

@TyrenDe
Copy link

TyrenDe commented Apr 11, 2022

I am not rate limited though

Status Code: 429
ratelimit-limit: 800
ratelimit-remaining: 798
ratelimit-reset: 1649720751

We are seeing the 429s now too, but our rate limits match what the author sees. That is, it shouldn't be getting rate limited as we have 798 remaining.

@bastimeyer
Copy link
Author

And btw, requesting only a single broadcaster_id doesn't result in the 500 (now 429) errors.

@bastimeyer
Copy link
Author

Seems to be working correctly and reliably again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product: api API endpoints in the "helix" namespace
Projects
None yet
Development

No branches or pull requests

3 participants