Open BarryCarlyon opened 3 years ago
The docs says that 404 should be returned when "The broadcaster is not a member of a team."
Then the documentation is wrong. as currently this bug is fixed and the result is
twitch api get 'teams/channel?broadcaster_id=56410307'
{
"data": []
}
I get null when using a real call and not twitch-cli
❯ twitch api get teams/channel -q broadcaster_id=1234
{
"data": []
}
I think twitch-cli is normalizing it
Ok so why did you add a comment suggest the issue was fixed but the docs say 404? Since all it did was add confusion.
You'll need a seperate issue to file a documentation bug
The comment was to the expected behaviour in this issue. The docs says 404, your expected result is an empty array (which is my prefered behaviour aswell) and the actual behaviour is null.
The bug is still active instead of an empty array receiving the following:
curl 'https://api.twitch.tv/helix/teams/channel?broadcaster_id=120750024'
{"data":null}
I believe this bug has been triggered by a person who is part of a team(s) being banned, and their account is reinstated.
Tested it with a bunch of recently banned accounts, and again with 120750024. Can't reproduce the null value. However the empty array still happens:
> twitch api get teams/channel -q broadcaster_id=57047445
{
"data": []
}
And I found another bug where it returns HTTP 500 instead of 404 if the user cannot be found. Will open that up as another ticket.
Actually, it seems it showing the empty array is purely from the Twitch CLI. Running it with curl shows a null value, even for accounts that aren't banned (such as mine).
Ticketed internally as ASYNC-3967
Brief description
https://dev.twitch.tv/docs/api/reference#get-channel-teams
if a channel is not in any teams, the API responds
Instead of
How to reproduce
Call Get Channel teams for a channel that is in no teams
Expected behavior
Empty array instead of null